using SM.core;
using SS;
using SS.core;
using SS.dir;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using TVSBH.core;
using TVSBH.dir;
using TVSGPP.core;
using TVSGPP.dir;
using TVSGPP.func;
using TVSGPP.sys;
namespace TVSBH.func
{
	public class frmInput : Form
	{
		private bool useBarcode = false;
		private bool updateDataWithSlideShow = false;
		private clsPrice objPrice = new clsPrice();
		private Func objFunc = new Func();
		private DataTable objTable = new DataTable();
		private DataTable objTableBill = new DataTable();
		private Bill objBill = new Bill();
		private Partner objPartner = new Partner();
		private products objProduct = new products();
		public string userName = "";
		public string fullName = "";
		private string currPid = "";
		private string currIdRegisters = "";
		private string currIdControl = "";
		private string currIdBisMake = "";
		private string currIdBisImport = "";
		private string providerAddress = "";
		private string providerPhone = "";
		private string perfixIn = "";
		private bool noAllowOtherEditBill = false;
		private bool noEditAffterPrint = false;
		private bool isPostBack = false;
		private bool BasePrice = false;
		private bool AllowSellSuppen = false;
		private bool AllowDouble = false;
		private double currPrice = 0.0;
		private double currRate = 1.0;
		private frmWaitting objW;
		private int currIndex = -1;
		private int slideShowIndex = -1;
		private int Direction = 1;
		private int saveInterval = 0;
		private int saveIntervalCondition = 0;
		private int currBillIndex = -1;
		private IContainer components = null;
		private GroupBox groupBox1;
		private TextBox txtID;
		private Label label1;
		private DateTimePicker txtDate;
		private Label label2;
		private Label label4;
		private ComboBox cbbTypeInput;
		private ComboBox cbbProvider;
		private Label label5;
		private Label label6;
		private TextBox txtDebt;
		private TextBox txtTotalMoney;
		private Label label7;
		private TextBox txtNote;
		private Label label8;
		private DataGridView dgvProduct;
		private GroupBox groupBox2;
		private TextBox txtProductName;
		private Label label9;
		private TextBox txtProductUnit;
		private Label label10;
		private TextBox txtProductMoney;
		private TextBox txtProductNumber;
		private Label label11;
		private TextBox txtProductPrice;
		private Label label13;
		private TextBox txtProductPacket;
		private Label label14;
		private Label label15;
		private DateTimePicker dptProductExpiryDate;
		private Label label16;
		private DateTimePicker dtpProductDate;
		private Button btnAddToBill;
		private Button btnSelect;
		private Button btnAdd;
		private Button btnEdit;
		private Button btnSave;
		private Button btnPrint;
		private Button btnDel;
		private Button btnClose;
		private DataGridView dgvBill;
		private GroupBox groupBox3;
		private TextBox txtProductPrice2;
		private Label label19;
		private TextBox txtProductPrice1;
		private Label label18;
		private ComboBox cbbVAT;
		private Label label21;
		private ComboBox cbbNational;
		private TextBox txtDiscountIn;
		private Label label22;
		private TextBox txtMoneyAfterDiscount;
		private Button btnSearch;
		private Button btnSelectPacket;
		private Label lblPossName;
		private Button btnListUnit;
		private ContextMenuStrip cmsBill;
		private ToolStripMenuItem cmsAddProduct;
		private ToolStripSeparator toolStripSeparator4;
		private ToolStripMenuItem cmsDelProduct;
		private ToolStripSeparator toolStripSeparator1;
		private ToolStripMenuItem cmsAddBill;
		private ToolStripMenuItem cmsEditBill;
		private ToolStripSeparator toolStripSeparator2;
		private ToolStripMenuItem cmsSaveBill;
		private ToolStripMenuItem cmsPrintBill;
		private ToolStripMenuItem cmsDellBill;
		private ToolStripSeparator toolStripSeparator3;
		private ToolStripMenuItem cmsSearchBill;
		private ComboBox cbbPossition;
		private CheckBox ckbPossition;
		private Button btnAddCustomer;
		private DateTimePicker dtpTo;
		private DateTimePicker dtpFrom;
		private Label label3;
		private Button btnSearchTime;
		private Label label17;
		private Label label23;
		private ComboBox cbbWareHouse;
		private TextBox txtMoney;
		private Label label27;
		private ToolTip toolTip1;
		private ContextMenuStrip ctmDir;
		private ToolStripMenuItem ctmDirAddProduct;
		private ToolStripMenuItem ctmDirAddUnit;
		private ToolStripMenuItem ctmDirAddRegion;
		private ToolStripMenuItem ctmDirAddPosition;
		private Button btnMore;
		private ContextMenuStrip ctmJustBill;
		private ToolStripMenuItem ctmJustBillAdd;
		private ToolStripMenuItem ctmJustBillEdit;
		private ToolStripMenuItem ctmJustBillPrint;
		private ToolStripSeparator toolStripSeparator5;
		private ToolStripMenuItem ctmJustBillDel;
		private ToolStripSeparator toolStripSeparator6;
		private ToolStripMenuItem ctmJustBillSearch;
		private Label label26;
		private System.Windows.Forms.Timer timer1;
		private Button btnStopSlide;
		private System.Windows.Forms.Timer timer2;
		private TextBox txtItemTotalMoney;
		private Label label20;
		private Label label24;
		private Label label29;
		private TextBox txtTotalVAT;
		private Label label30;
		private Label label31;
		private TextBox txtBarcode;
		private Label label12;
		private Label label28;
		private DataGridViewTextBoxColumn Column2;
		private DataGridViewTextBoxColumn Column1;
		private DataGridViewTextBoxColumn Column3;
		private DataGridViewTextBoxColumn Column4;
		private DataGridViewTextBoxColumn Column5;
		private DataGridViewTextBoxColumn Column18;
		private DataGridViewTextBoxColumn VATasMoney;
		private DataGridViewTextBoxColumn Column6;
		private DataGridViewTextBoxColumn Column7;
		private DataGridViewTextBoxColumn Column8;
		private DataGridViewTextBoxColumn Column9;
		private DataGridViewTextBoxColumn Column15;
		private DataGridViewTextBoxColumn Column16;
		private DataGridViewTextBoxColumn Column17;
		private DataGridViewTextBoxColumn possName;
		private DataGridViewTextBoxColumn IdRegisters;
		private DataGridViewTextBoxColumn IdControl;
		private DataGridViewTextBoxColumn IdBisMake;
		private DataGridViewTextBoxColumn IdBisImport;
		private DataGridViewTextBoxColumn BarCode;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
		private DataGridViewTextBoxColumn Column10;
		private DataGridViewTextBoxColumn Column11;
		private DataGridViewTextBoxColumn Column12;
		private DataGridViewTextBoxColumn Column13;
		private DataGridViewTextBoxColumn Column14;
		private DataGridViewTextBoxColumn Column19;
		private DataGridViewTextBoxColumn Column20;
		private DataGridViewTextBoxColumn Column21;
		private Label label25;
		public frmInput()
		{
			this.InitializeComponent();
		}
		private void showWatting()
		{
			this.objW = new frmWaitting();
			this.objW.ShowDialog();
			Thread.Sleep(40);
		}
		private void frmInput_Load(object sender, EventArgs e)
		{
			this.objFunc.LoadComboBox("SELECT [ID], UPPER(Name) AS Name FROM [TabTypeInput] ORDER BY [OrderBy]", this.cbbTypeInput, "ID", "Name");
			this.objFunc.LoadComboBox("SELECT [CusID] , UPPER(Name) AS Name  FROM [TabPartner] WHERE [IsProvider] = 1", this.cbbProvider, "CusID", "Name");
			this.objFunc.LoadComboBox("SELECT [ID], UPPER(Name) AS Name FROM [TabNational] ORDER BY [Name]", this.cbbNational, "ID", "Name");
			this.objFunc.LoadComboBox("SELECT ID, UPPER(Name) AS Name FROM TabPossition ORDER BY Name", this.cbbPossition, "ID", "Name");
			this.objFunc.LoadComboBox("SELECT WareHouse_ID, UPPER(WareHouse_Name) AS Name FROM TabWareHouse ORDER BY WareHouse_Name", this.cbbWareHouse, "WareHouse_ID", "Name");
			this.cbbVAT.SelectedIndex = 1;
			this.getBill("");
			this.cbbNational.SelectedValue = "VN";
			this.noAllowOtherEditBill = this.objFunc.getNoAllowOtherEditBill();
			this.noEditAffterPrint = this.objFunc.getNoEditAffterPrint();
			this.BasePrice = this.objFunc.getBasePrice();
			this.perfixIn = this.objFunc.GetPerfixIn();
			this.AllowSellSuppen = this.objFunc.getAllowSellSuppen();
			this.AllowDouble = this.objFunc.getAllowDouble();
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void frmInput_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Escape)
			{
				base.Close();
			}
			else
			{
				if (e.KeyCode == Keys.F2)
				{
					this.btnSelect.PerformClick();
				}
				else
				{
					if (e.KeyCode == Keys.F3)
					{
						this.btnAddToBill.PerformClick();
					}
					else
					{
						if (e.KeyCode == Keys.F4)
						{
							this.btnAdd.PerformClick();
						}
						else
						{
							if (e.KeyCode == Keys.F5)
							{
								this.btnEdit.PerformClick();
							}
							else
							{
								if (e.KeyCode == Keys.F6)
								{
									this.btnSave.PerformClick();
								}
								else
								{
									if (e.KeyCode == Keys.F7)
									{
										this.btnPrint.PerformClick();
									}
									else
									{
										if (e.KeyCode == Keys.F8)
										{
											this.btnDel.PerformClick();
										}
										else
										{
											if (e.KeyCode == Keys.F9)
											{
												this.btnSearch.PerformClick();
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		private void btnSelect_Click(object sender, EventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				this.useBarcode = false;
				frmSelectProduct frmSelectProduct = new frmSelectProduct();
				frmSelectProduct.txtSearch.Text = this.txtProductName.Text;
				frmSelectProduct.isInput = true;
				frmSelectProduct.Location = new System.Drawing.Point(this.groupBox2.Location.X + 88, this.groupBox2.Location.X + this.btnSelect.Location.Y - 84);
				frmSelectProduct.ShowDialog();
				if (frmSelectProduct.productID != "")
				{
					if (!this.AllowSellSuppen)
					{
						if (this.objProduct.checkForSuppend(frmSelectProduct.productID, "0"))
						{
							MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + frmSelectProduct.productName + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể nhập kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							return;
						}
					}
					this.currPid = frmSelectProduct.productID;
					this.txtProductName.Text = frmSelectProduct.productName;
					this.txtProductUnit.Text = frmSelectProduct.unitName;
					if (this.BasePrice)
					{
						this.txtProductPrice.Text = this.objProduct.getPriceInCurrent(this.currPid).ToString();
						this.txtProductPrice1.Text = this.objProduct.getPriceOutTradeCurrent(this.currPid).ToString();
						this.txtProductPrice2.Text = this.objProduct.getPriceOutRetailCurrent(this.currPid).ToString();
					}
					else
					{
						this.txtProductPrice.Text = frmSelectProduct.priceBase;
						this.txtProductPrice1.Text = frmSelectProduct.priceTrade;
						this.txtProductPrice2.Text = frmSelectProduct.priceRetail;
					}
					this.currPrice = (double)float.Parse(this.txtProductPrice.Text.Replace(",", ""));
					this.lblPossName.Text = frmSelectProduct.productPossName;
					this.cbbPossition.Text = this.lblPossName.Text;
					this.currRate = 1.0;
					this.txtProductNumber.Focus();
				}
			}
		}
		private void txtProductNumber_TextChanged(object sender, EventArgs e)
		{
			double num = 0.0;
			if (this.txtProductNumber.Text != "")
			{
				float num2 = 0f;
				if (this.cbbVAT.SelectedIndex == 0)
				{
					num2 = 0f;
				}
				else
				{
					if (this.cbbVAT.SelectedIndex == 1)
					{
						num2 = 5f;
					}
					else
					{
						if (this.cbbVAT.SelectedIndex == 2)
						{
							num2 = 10f;
						}
					}
				}
				try
				{
					num = double.Parse(this.txtProductNumber.Text);
				}
				catch
				{
					num = 0.0;
				}
				if (this.txtProductPrice.Text != "")
				{
					this.txtProductMoney.Text = (num * double.Parse(this.txtProductPrice.Text) * (double)(1f + num2 / 100f)).ToString();
				}
			}
			this.setStatusBtnAddToBill();
		}
		private void txtProductName_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void setStatusBtnAddToBill()
		{
			if (this.txtProductName.Text != "" && this.txtProductUnit.Text != "" && this.txtProductPrice.Text != "" && this.txtProductNumber.Text != "" && this.txtProductMoney.Text != "")
			{
				this.btnAddToBill.Enabled = true;
			}
			else
			{
				this.btnAddToBill.Enabled = false;
			}
		}
		private void btnAddToBill_Click(object sender, EventArgs e)
		{
			if (DateTime.Parse(this.dptProductExpiryDate.Value.ToShortDateString()) <= DateTime.Parse(this.dtpProductDate.Value.ToShortDateString()))
			{
				MessageBox.Show("Hạn sử dụng phải lớn hơn ngày sản xuất !", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
			else
			{
				float num = 0f;
				float num2 = 0f;
				if (this.txtProductNumber.Text == "")
				{
					MessageBox.Show("Nhập vào số lượng sản phẩm cần nhập kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					this.txtProductNumber.Focus();
				}
				else
				{
					try
					{
						num = float.Parse(this.txtProductNumber.Text);
					}
					catch
					{
						MessageBox.Show("Nhập vào số lượng sản phẩm cần nhập hàng", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						this.txtProductNumber.Focus();
						return;
					}
					if (this.txtProductPrice.Text == "")
					{
						MessageBox.Show("Nhập vào giá nhập kho của sản phẩm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						this.txtProductPrice.Focus();
					}
					else
					{
						try
						{
							num2 = float.Parse(this.txtProductPrice.Text);
						}
						catch
						{
							MessageBox.Show("Nhập vào giá nhập kho của sản phẩm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							this.txtProductPrice.Focus();
							return;
						}
						if (this.txtProductPrice1.Text == "")
						{
							MessageBox.Show("Nhập vào giá bán buôn của sản phẩm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							this.txtProductPrice1.Focus();
						}
						else
						{
							try
							{
								float num3 = float.Parse(this.txtProductPrice1.Text);
							}
							catch
							{
								MessageBox.Show("Nhập vào giá bán buôn của sản phẩm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								this.txtProductPrice1.Focus();
								return;
							}
							if (this.txtProductPrice2.Text == "")
							{
								MessageBox.Show("Nhập vào giá bán lẻ của sản phẩm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								this.txtProductPrice2.Focus();
							}
							else
							{
								try
								{
									float num4 = float.Parse(this.txtProductPrice2.Text);
								}
								catch
								{
									MessageBox.Show("Nhập vào giá bán lẻ của sản phẩm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
									this.txtProductPrice2.Focus();
									return;
								}
								if (this.txtProductPacket.Text == "")
								{
									MessageBox.Show("Cung cấp số hiệu của lô hàng dự kiến nhập!", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
									this.txtProductPacket.Focus();
								}
								else
								{
									float num5 = 0f;
									if (this.cbbVAT.SelectedIndex == 0)
									{
										num5 = 0f;
									}
									else
									{
										if (this.cbbVAT.SelectedIndex == 1)
										{
											num5 = 5f;
										}
										else
										{
											if (this.cbbVAT.SelectedIndex == 2)
											{
												num5 = 10f;
											}
										}
									}
									double num6 = (double)(num5 * num2 * num / 100f);
									int num7 = this.checkInObjTable(this.currPid, this.txtProductPacket.Text);
									if (num7 == -1 || this.AllowDouble)
									{
										if (!this.ckbPossition.Checked)
										{
											this.objTable.Rows.Add(new object[]
											{
												this.currPid,
												this.txtProductName.Text,
												this.txtProductUnit.Text,
												this.txtProductNumber.Text,
												this.txtProductPrice.Text,
												(double.Parse(this.txtProductNumber.Text.Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) * (double)(1f + num5 / 100f)).ToString(),
												this.txtProductPacket.Text,
												this.dtpProductDate.Value,
												this.dptProductExpiryDate.Value,
												this.txtProductPrice1.Text,
												this.txtProductPrice2.Text,
												this.cbbNational.SelectedValue.ToString(),
												num5.ToString(),
												this.lblPossName.Text,
												this.currRate.ToString(),
												this.currIdRegisters,
												this.currIdControl,
												this.currIdBisMake,
												this.currIdBisImport,
												num6,
												this.txtBarcode.Text
											});
										}
										else
										{
											this.objTable.Rows.Add(new object[]
											{
												this.currPid,
												this.txtProductName.Text,
												this.txtProductUnit.Text,
												this.txtProductNumber.Text,
												this.txtProductPrice.Text,
												(double.Parse(this.txtProductNumber.Text.Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) * (double)(1f + num5 / 100f)).ToString(),
												this.txtProductPacket.Text,
												this.dtpProductDate.Value,
												this.dptProductExpiryDate.Value,
												this.txtProductPrice1.Text,
												this.txtProductPrice2.Text,
												this.cbbNational.SelectedValue.ToString(),
												num5.ToString(),
												this.cbbPossition.Text,
												this.currRate.ToString(),
												this.currIdRegisters,
												this.currIdControl,
												this.currIdBisMake,
												this.currIdBisImport,
												num6,
												this.txtBarcode.Text
											});
										}
										this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
									}
									else
									{
										this.updateObjTable(num7);
										this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
										this.txtTotalVAT.Text = string.Format(Program.lenAffterDecimal, this.caculaterTotalVAT());
									}
									try
									{
										double num8 = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
										this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num8);
										this.txtTotalVAT.Text = string.Format(Program.lenAffterDecimal, this.caculaterTotalVAT());
									}
									catch
									{
										this.txtMoneyAfterDiscount.Text = "0";
									}
									this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.txtMoney.Text));
									try
									{
										double num8 = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
										this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num8);
									}
									catch
									{
										this.txtTotalMoney.Text = "0";
									}
									if (this.ckbPossition.Checked)
									{
										this.objProduct.forWardPossition(this.currPid, this.cbbPossition.SelectedValue.ToString(), this.cbbPossition.Text);
									}
									this.resetControl();
									this.txtProductName.Focus();
								}
							}
						}
					}
				}
			}
		}
		private int checkInObjTable(string Pid, string Packet)
		{
			int num = -1;
			int result;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				if (this.objTable.Rows[i]["Pid"].ToString() == Pid && this.objTable.Rows[i]["Packet"].ToString() == Packet)
				{
					num = i;
					result = num;
					return result;
				}
			}
			result = num;
			return result;
		}
		private void resetControl()
		{
			this.txtBarcode.Text = "";
			this.txtProductNumber.Text = "";
			this.txtProductName.Text = "";
			this.txtProductPacket.Text = "";
			this.txtProductUnit.Text = "";
			this.txtProductPrice.Text = "";
			this.txtProductMoney.Text = "";
			this.txtProductPrice1.Text = "";
			this.txtProductPrice2.Text = "";
			this.txtItemTotalMoney.Text = "";
			this.currPid = "";
		}
		private double checkMoneyOfBill()
		{
			double num = 0.0;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				num += double.Parse(this.objTable.Rows[i]["ProductMoney"].ToString());
			}
			return num;
		}
		private void updateObjTable(int index)
		{
			this.objTable.Rows[index]["Pid"] = this.currPid;
			this.objTable.Rows[index]["ProductName"] = this.txtProductName.Text;
			this.objTable.Rows[index]["ProductUnit"] = this.txtProductUnit.Text;
			this.objTable.Rows[index]["ProductPrice"] = this.txtProductPrice.Text;
			this.objTable.Rows[index]["ProductNumber"] = this.txtProductNumber.Text;
			this.objTable.Rows[index]["Packet"] = this.txtProductPacket.Text;
			this.objTable.Rows[index]["ProductDate"] = this.dtpProductDate.Value;
			this.objTable.Rows[index]["ProductExpiryDate"] = this.dptProductExpiryDate.Value;
			this.objTable.Rows[index]["ProductPrice1"] = this.txtProductPrice1.Text;
			this.objTable.Rows[index]["ProductPrice2"] = this.txtProductPrice2.Text;
			this.objTable.Rows[index]["NationalID"] = this.cbbNational.SelectedValue.ToString();
			this.objTable.Rows[index]["Rate"] = this.currRate.ToString();
			float num = 0f;
			if (this.cbbVAT.SelectedIndex == 0)
			{
				num = 0f;
			}
			else
			{
				if (this.cbbVAT.SelectedIndex == 1)
				{
					num = 5f;
				}
				else
				{
					if (this.cbbVAT.SelectedIndex == 2)
					{
						num = 10f;
					}
				}
			}
			double num2 = (double)(num / 100f) * (double.Parse(this.txtProductNumber.Text.Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", "")));
			this.objTable.Rows[index]["VAT"] = num;
			this.objTable.Rows[index]["VATasMoney"] = string.Format(Program.lenAffterDecimal, num2);
			this.objTable.Rows[index]["ProductMoney"] = string.Format(Program.lenAffterDecimal, double.Parse(this.txtProductNumber.Text.Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) * (double)(1f + num / 100f));
			if (!this.ckbPossition.Checked)
			{
				this.objTable.Rows[index]["possName"] = this.lblPossName.Text;
			}
			else
			{
				this.objTable.Rows[index]["possName"] = this.cbbPossition.Text;
			}
			this.objTable.Rows[index]["IdRegisters"] = this.currIdRegisters;
			this.objTable.Rows[index]["IdControl"] = this.currIdControl;
			this.objTable.Rows[index]["IdBisMake"] = this.currIdBisMake;
			this.objTable.Rows[index]["IdBisImport"] = this.currIdBisImport;
			this.objTable.Rows[index]["Barcode"] = this.txtBarcode.Text;
		}
		private void dgvProduct_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				if (e.RowIndex != -1 && this.btnSave.Enabled)
				{
					this.currIndex = e.RowIndex;
					this.currPid = this.objTable.Rows[e.RowIndex]["Pid"].ToString();
					this.currIdRegisters = this.objTable.Rows[e.RowIndex]["IdRegisters"].ToString();
					this.currIdControl = this.objTable.Rows[e.RowIndex]["IdControl"].ToString();
					this.currIdBisMake = this.objTable.Rows[e.RowIndex]["IdBisMake"].ToString();
					this.currIdBisImport = this.objTable.Rows[e.RowIndex]["IdBisImport"].ToString();
					this.currRate = (double)float.Parse(this.objTable.Rows[e.RowIndex]["Rate"].ToString());
					this.txtProductName.Text = this.objTable.Rows[e.RowIndex]["ProductName"].ToString();
					this.currRate = (double)float.Parse(this.objTable.Rows[e.RowIndex]["Rate"].ToString());
					this.txtProductUnit.Text = this.objTable.Rows[e.RowIndex]["ProductUnit"].ToString();
					this.txtProductPrice.Text = this.objTable.Rows[e.RowIndex]["ProductPrice"].ToString();
					this.txtProductNumber.Text = this.objTable.Rows[e.RowIndex]["ProductNumber"].ToString();
					this.txtProductMoney.Text = this.objTable.Rows[e.RowIndex]["ProductMoney"].ToString();
					this.txtProductPacket.Text = this.objTable.Rows[e.RowIndex]["Packet"].ToString();
					this.dtpProductDate.Value = DateTime.Parse(this.objTable.Rows[e.RowIndex]["ProductDate"].ToString());
					this.dptProductExpiryDate.Value = DateTime.Parse(this.objTable.Rows[e.RowIndex]["ProductExpiryDate"].ToString());
					this.txtProductPrice1.Text = this.objTable.Rows[e.RowIndex]["ProductPrice1"].ToString();
					this.txtProductPrice2.Text = this.objTable.Rows[e.RowIndex]["ProductPrice2"].ToString();
					this.cbbNational.SelectedValue = this.objTable.Rows[e.RowIndex]["NationalID"].ToString();
					this.lblPossName.Text = this.objTable.Rows[e.RowIndex]["possName"].ToString();
					this.txtBarcode.Text = this.objTable.Rows[e.RowIndex]["Barcode"].ToString();
					if (this.objTable.Rows[e.RowIndex]["VAT"].ToString() == "0")
					{
						this.cbbVAT.SelectedIndex = 0;
					}
					else
					{
						if (this.objTable.Rows[e.RowIndex]["VAT"].ToString() == "5")
						{
							this.cbbVAT.SelectedIndex = 1;
						}
						else
						{
							if (this.objTable.Rows[e.RowIndex]["VAT"].ToString() == "10")
							{
								this.cbbVAT.SelectedIndex = 2;
							}
						}
					}
					this.btnAddToBill.Enabled = true;
					this.currPrice = double.Parse(this.objProduct.getPriceInAVG(this.currPid).ToString());
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}
		private void txtProductNumber_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtItemTotalMoney.Focus();
			}
		}
		private void btnAdd_Click(object sender, EventArgs e)
		{
			this.objTable = new DataTable();
			DataColumn column = new DataColumn("Pid", typeof(string));
			DataColumn column2 = new DataColumn("ProductName", typeof(string));
			DataColumn column3 = new DataColumn("ProductUnit", typeof(string));
			DataColumn column4 = new DataColumn("ProductNumber", typeof(string));
			DataColumn column5 = new DataColumn("ProductPrice", typeof(string));
			DataColumn column6 = new DataColumn("ProductMoney", typeof(string));
			DataColumn column7 = new DataColumn("Packet", typeof(string));
			DataColumn column8 = new DataColumn("ProductDate", typeof(DateTime));
			DataColumn column9 = new DataColumn("ProductExpiryDate", typeof(DateTime));
			DataColumn column10 = new DataColumn("ProductPrice1", typeof(string));
			DataColumn column11 = new DataColumn("ProductPrice2", typeof(string));
			DataColumn column12 = new DataColumn("NationalID", typeof(string));
			DataColumn column13 = new DataColumn("VAT", typeof(string));
			DataColumn column14 = new DataColumn("possName", typeof(string));
			DataColumn column15 = new DataColumn("Rate", typeof(string));
			DataColumn column16 = new DataColumn("IdRegisters", typeof(string));
			DataColumn column17 = new DataColumn("IdControl", typeof(string));
			DataColumn column18 = new DataColumn("IdBisMake", typeof(string));
			DataColumn column19 = new DataColumn("IdBisImport", typeof(string));
			DataColumn column20 = new DataColumn("VATasMoney", typeof(float));
			DataColumn column21 = new DataColumn("Barcode", typeof(string));
			this.objTable.Columns.Add(column);
			this.objTable.Columns.Add(column2);
			this.objTable.Columns.Add(column3);
			this.objTable.Columns.Add(column4);
			this.objTable.Columns.Add(column5);
			this.objTable.Columns.Add(column6);
			this.objTable.Columns.Add(column7);
			this.objTable.Columns.Add(column8);
			this.objTable.Columns.Add(column9);
			this.objTable.Columns.Add(column10);
			this.objTable.Columns.Add(column11);
			this.objTable.Columns.Add(column12);
			this.objTable.Columns.Add(column13);
			this.objTable.Columns.Add(column14);
			this.objTable.Columns.Add(column15);
			this.objTable.Columns.Add(column16);
			this.objTable.Columns.Add(column17);
			this.objTable.Columns.Add(column18);
			this.objTable.Columns.Add(column19);
			this.objTable.Columns.Add(column20);
			this.objTable.Columns.Add(column21);
			this.dgvProduct.AutoGenerateColumns = false;
			this.dgvProduct.DataSource = this.objTable;
			this.txtID.ReadOnly = false;
			this.btnSave.Enabled = true;
			this.btnEdit.Enabled = false;
			this.btnPrint.Enabled = false;
			this.btnDel.Enabled = false;
			this.btnSelect.Enabled = true;
			this.txtProductNumber.ReadOnly = false;
			this.txtProductPacket.ReadOnly = false;
			this.txtProductPrice.ReadOnly = false;
			this.txtProductPrice1.ReadOnly = false;
			this.txtProductPrice2.ReadOnly = false;
			this.txtDiscountIn.ReadOnly = false;
			this.resetAllControl();
		}
		private void resetAllControl()
		{
			try
			{
				this.cbbProvider.Enabled = true;
				this.cbbWareHouse.Enabled = true;
				this.cbbTypeInput.Enabled = true;
				this.txtDate.Enabled = true;
				this.txtID.Enabled = true;
				this.txtID.Text = "";
				this.txtDate.Value = DateTime.Now;
				this.txtTotalMoney.Text = "0";
				this.cbbTypeInput.SelectedIndex = 0;
				this.txtNote.Text = "";
				this.cbbProvider.SelectedIndex = 0;
				this.txtDebt.Text = "0";
				this.txtProductNumber.Text = "1";
				this.txtProductName.Text = "";
				this.txtProductPacket.Text = "";
				this.txtProductUnit.Text = "";
				this.txtProductPrice.Text = "0";
				this.txtProductMoney.Text = "0";
				this.txtProductPrice.Text = "0";
				this.txtProductPrice1.Text = "0";
				this.txtProductPrice2.Text = "0";
				this.txtDiscountIn.Text = "0";
				this.txtMoney.Text = "0";
				this.currPid = "";
				this.txtBarcode.Text = "";
				this.currIdRegisters = "";
				this.currIdControl = "";
				this.currIdBisMake = "";
				this.currIdBisImport = "";
				this.txtBarcode.ReadOnly = false;
				this.cbbPossition.Enabled = true;
				this.btnMore.Enabled = true;
				this.cbbVAT.Enabled = true;
				this.cbbNational.Enabled = true;
				this.cbbTypeInput.Focus();
			}
			catch
			{
			}
		}
		private void btnSave_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.dgvProduct.Rows.Count == 0)
				{
					MessageBox.Show("Nhập thông tin chi tiết về đơn hàng trước khi lưu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
				else
				{
					if (this.cbbProvider.Items.Count == 0)
					{
						MessageBox.Show("Chọn Nhà cung cấp trước khi nhập hàng vào kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
					else
					{
						if (this.txtID.Text.Trim() == "")
						{
							this.txtID.Text = "NEW";
						}
						if (!this.btnEdit.Enabled)
						{
							if (this.objBill.checkID(this.txtID.Text))
							{
								MessageBox.Show("Hoá đơn có số hiệu \"" + this.txtID.Text + "\" đã tồn tại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								this.txtID.Focus();
								return;
							}
						}
						if (this.objBill.action(this.txtID.Text, this.txtDate.Value, float.Parse(this.txtMoney.Text), this.cbbTypeInput.SelectedValue.ToString(), this.cbbWareHouse.SelectedValue.ToString(), this.txtNote.Text, this.cbbProvider.SelectedValue.ToString(), this.objTable, "IN", this.userName, this.fullName, float.Parse(this.txtDiscountIn.Text), float.Parse(this.txtTotalMoney.Text)) == 1)
						{
							MessageBox.Show("Có lỗi xảy ra trong quá trình lưu hoá đơn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							this.txtID.Focus();
						}
						else
						{
							if (!this.btnStopSlide.Visible)
							{
								this.getBill("");
								this.btnEdit.Enabled = true;
								this.btnPrint.Enabled = true;
								this.btnDel.Enabled = true;
								this.btnSave.Enabled = false;
								this.txtDiscountIn.ReadOnly = true;
								this.txtBarcode.ReadOnly = true;
								this.btnAdd.PerformClick();
							}
							else
							{
								this.btnEdit.Enabled = true;
								this.btnPrint.Enabled = true;
								this.btnDel.Enabled = true;
								this.btnSave.Enabled = false;
								this.txtDiscountIn.ReadOnly = true;
								this.txtBarcode.ReadOnly = true;
								this.timer2.Stop();
							}
						}
					}
				}
			}
			catch
			{
				MessageBox.Show("Lỗi : - Việc lưu hoá đơn không thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
		}
		private void getBill(string sql_Search)
		{
			try
			{
				this.resetAllControl();
				this.dgvBill.AutoGenerateColumns = false;
				this.dgvProduct.DataSource = null;
				this.dgvProduct.AutoGenerateColumns = false;
				SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
				string cmdText;
				if (sql_Search == "")
				{
					cmdText = "SELECT * FROM [TabBill] WHERE TypeInput IN ('IN1','IN2','IN3') AND CreateDate BETWEEN @ObjDate1 AND @objDate2 ORDER BY [CreateDate] DESC";
				}
				else
				{
					cmdText = sql_Search + " AND [TabBill].[CreateDate] BETWEEN @ObjDate1 AND @objDate2 ORDER BY [TabBill].[CreateDate] DESC";
				}
				SqlCommand sqlCommand = new SqlCommand(cmdText, sqlConnection);
				SqlParameter sqlParameter = new SqlParameter("ObjDate1", SqlDbType.DateTime);
				SqlParameter sqlParameter2 = new SqlParameter("ObjDate2", SqlDbType.DateTime);
				sqlParameter.Value = DateTime.Parse(this.dtpFrom.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
				sqlParameter2.Value = DateTime.Parse(this.dtpTo.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
				sqlCommand.Parameters.Add(sqlParameter);
				sqlCommand.Parameters.Add(sqlParameter2);
				SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
				DataSet dataSet = new DataSet();
				sqlConnection.Open();
				sqlDataAdapter.Fill(dataSet);
				this.objTableBill = dataSet.Tables[0];
				this.dgvBill.DataSource = this.objTableBill;
				sqlConnection.Close();
				sqlConnection.Dispose();
				sqlDataAdapter.Dispose();
				dataSet.Dispose();
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}
		private void dgvBill_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				if (this.isPostBack)
				{
					this.txtDiscountIn.Text = "0";
					this.txtMoneyAfterDiscount.Text = "0";
					this.txtTotalMoney.Text = "0";
					this.txtMoney.Text = "0";
					this.lblPossName.Text = "";
					this.currBillIndex = e.RowIndex;
					this.txtID.Text = this.objTableBill.Rows[e.RowIndex]["ID"].ToString();
					this.txtDate.Value = DateTime.Parse(this.objTableBill.Rows[e.RowIndex]["CreateDate"].ToString());
					this.txtMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.objTableBill.Rows[e.RowIndex]["TotalMoney"].ToString()));
					this.cbbTypeInput.SelectedValue = this.objTableBill.Rows[e.RowIndex]["TypeInput"].ToString();
					this.cbbProvider.SelectedValue = this.objTableBill.Rows[e.RowIndex]["PID"].ToString();
					this.txtNote.Text = this.objTableBill.Rows[e.RowIndex]["Note"].ToString();
					this.cbbWareHouse.SelectedValue = this.objTableBill.Rows[e.RowIndex]["WID"].ToString();
					this.dgvProduct.AutoGenerateColumns = false;
					this.objTable = new DataTable();
					this.objTable = this.objBill.getDetailBill(this.txtID.Text);
					this.dgvProduct.DataSource = this.objTable;
					this.getObjectInfo();
					this.txtDiscountIn.Text = this.objTableBill.Rows[e.RowIndex]["Discount"].ToString();
					this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
					try
					{
						double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
						this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
					}
					catch
					{
						this.txtMoneyAfterDiscount.Text = "0";
					}
					this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.txtMoney.Text));
					try
					{
						double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
						this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
					}
					catch
					{
						this.txtTotalMoney.Text = "0";
					}
					this.cbbProvider.Enabled = false;
					this.cbbWareHouse.Enabled = false;
					this.cbbTypeInput.Enabled = false;
					this.txtDate.Enabled = false;
					this.txtID.Enabled = false;
					this.txtID.ReadOnly = true;
					this.btnEdit.Enabled = true;
					this.btnSelect.Enabled = false;
					this.btnAddToBill.Enabled = false;
					this.txtProductNumber.ReadOnly = true;
					this.txtProductPacket.ReadOnly = true;
					this.txtProductPrice.ReadOnly = true;
					this.txtProductPrice1.ReadOnly = true;
					this.txtProductPrice2.ReadOnly = true;
					this.btnSave.Enabled = false;
					this.btnPrint.Enabled = true;
					this.btnDel.Enabled = false;
					this.cbbPossition.Enabled = false;
					this.btnMore.Enabled = false;
					this.cbbNational.Enabled = false;
					this.cbbVAT.Enabled = false;
					this.cbbProvider.Enabled = false;
					this.cbbTypeInput.Enabled = false;
					this.cbbWareHouse.Enabled = false;
					this.resetControl();
					this.txtTotalVAT.Text = string.Format(Program.lenAffterDecimal, this.caculaterTotalVAT());
				}
			}
			catch
			{
			}
		}
		private void btnEdit_Click(object sender, EventArgs e)
		{
			if (this.userName.ToUpper() == "ADMIN" || !this.noAllowOtherEditBill || (this.noAllowOtherEditBill && this.objBill.getuserNameBillID(this.txtID.Text) == this.userName))
			{
				if (this.noEditAffterPrint)
				{
					MessageBox.Show("Hoá đơn này đã được in. Bạn không thể sửa đổi !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
				else
				{
					this.btnSave.Enabled = true;
					this.btnDel.Enabled = true;
					this.btnPrint.Enabled = true;
					this.btnSelect.Enabled = true;
					this.setStatusBtnAddToBill();
					this.txtProductNumber.ReadOnly = false;
					this.txtProductPacket.ReadOnly = false;
					this.txtProductPrice.ReadOnly = false;
					this.txtProductPrice1.ReadOnly = false;
					this.txtProductPrice2.ReadOnly = false;
					this.txtDiscountIn.ReadOnly = false;
					this.cbbPossition.Enabled = true;
					this.cbbNational.Enabled = true;
					this.btnMore.Enabled = true;
					this.cbbVAT.Enabled = true;
					this.cbbProvider.Enabled = true;
					this.cbbTypeInput.Enabled = true;
					this.cbbWareHouse.Enabled = true;
					this.txtDate.Enabled = true;
					this.dgvProduct.Focus();
				}
			}
			else
			{
				MessageBox.Show("Không thể sủa hoá đơn vì một trong các lý do sau :\r\n\r\n- Hoá đơn đã lập không được sửa\r\n\r\n- Bạn không phải là người lập ra hoá đơn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
		}
		private void cbbProvider_SelectedIndexChanged(object sender, EventArgs e)
		{
			this.getObjectInfo();
		}
		private void getObjectInfo()
		{
			if (this.isPostBack)
			{
				try
				{
					double num = this.objPartner.getFistBalanceProvider(this.cbbProvider.SelectedValue.ToString()) + this.objPartner.getTotalMoney(this.cbbProvider.SelectedValue.ToString(), this.txtDate.Value) - this.objPartner.getTotalMoneyPayedProvider(this.cbbProvider.SelectedValue.ToString(), this.txtDate.Value);
					this.txtDiscountIn.Text = this.objPartner.getDiscountProvider(this.cbbProvider.SelectedValue.ToString()).ToString();
					this.txtDebt.Text = num.ToString();
					this.providerAddress = this.objPartner.getAddress(this.cbbProvider.SelectedValue.ToString());
					this.providerPhone = this.objPartner.getPhone(this.cbbProvider.SelectedValue.ToString());
				}
				catch
				{
				}
			}
		}
		private void dtpSelectMonth_ValueChanged(object sender, EventArgs e)
		{
			if (this.isPostBack)
			{
				this.getBill("");
			}
		}
		private void dgvProduct_KeyPress(object sender, KeyPressEventArgs e)
		{
			MessageBox.Show(e.KeyChar.ToString());
		}
		private void dgvProduct_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Delete && this.btnSave.Enabled)
			{
				this.objTable.Rows[this.currIndex].Delete();
				this.dgvProduct.Refresh();
				this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
			}
		}
		private void cmsDelProduct_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.btnSave.Enabled)
				{
					this.objTable.Rows[this.currIndex].Delete();
					this.dgvProduct.Refresh();
					this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
				}
			}
			catch
			{
			}
		}
		private void txtProductUnit_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void txtProductPrice_TextChanged(object sender, EventArgs e)
		{
			float num = 0f;
			float num2 = 0f;
			if (this.cbbVAT.SelectedIndex == 0)
			{
				num2 = 0f;
			}
			else
			{
				if (this.cbbVAT.SelectedIndex == 1)
				{
					num2 = 5f;
				}
				else
				{
					if (this.cbbVAT.SelectedIndex == 2)
					{
						num2 = 10f;
					}
				}
			}
			try
			{
				num = float.Parse(this.txtProductPrice.Text.Replace(",", ""));
			}
			catch
			{
				num = 0f;
			}
			try
			{
				float num3 = (num + num * this.objPrice.getPriceOutput(num, "percent1") / 100f) * (1f + num2 / 100f);
				this.txtProductPrice1.Text = num3.ToString();
			}
			catch
			{
				this.txtProductPrice1.Text = "0";
			}
			try
			{
				float num4 = (num + num * this.objPrice.getPriceOutput(num, "percent2") / 100f) * (1f + num2 / 100f);
				this.txtProductPrice2.Text = num4.ToString();
			}
			catch
			{
				this.txtProductPrice2.Text = "0";
			}
		}
		private void txtProductMoney_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void btnDel_Click(object sender, EventArgs e)
		{
			if (MessageBox.Show("Bạn có chắc chắn muốn xoá hoá đơn [ " + this.txtID.Text.ToUpper() + " ] không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
			{
				this.objBill.delItem(this.txtID.Text);
				try
				{
					this.dgvProduct.DataSource = null;
					this.dgvBill.Rows.RemoveAt(this.currBillIndex);
				}
				catch
				{
					this.getBill("");
				}
				this.btnAdd.PerformClick();
			}
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmInputBill.objTable = new DataTable();
			frmInputView frmInputView = new frmInputView();
			frmInputView.billID = this.txtID.Text;
			frmInputView.billDate = this.txtDate.Text;
			frmInputView.billNote = this.txtNote.Text;
			frmInputView.billTotalMoney = this.txtTotalMoney.Text;
			frmInputView.providerName = this.cbbProvider.Text;
			frmInputView.providerAddress = this.providerAddress;
			frmInputView.providerPhone = this.providerPhone;
			frmInputView.Debt = this.txtDebt.Text;
			double num = double.Parse(this.txtTotalMoney.Text) + double.Parse(this.txtDebt.Text);
			frmInputView.ALl = string.Format(Program.lenAffterDecimal, num);
			frmInputBill.objTable = this.objTable;
			frmInputBill.totalMoney = this.txtMoney.Text;
			frmInputBill.totalVAT = this.txtTotalVAT.Text;
			frmInputBill.discount = this.txtMoneyAfterDiscount.Text;
			try
			{
				frmInputBill.moneyByWord = "Số tiền bằng chữ : " + this.objFunc.changeNumberToWord1(long.Parse(num.ToString()));
			}
			catch
			{
				frmInputBill.moneyByWord = "";
			}
			frmInputView.ShowDialog();
			try
			{
				this.dgvProduct.Columns["TT"].Visible = false;
			}
			catch
			{
			}
			this.objBill.setPrinted(this.txtID.Text);
		}
		private void cbbVAT_SelectedIndexChanged(object sender, EventArgs e)
		{
			double num = 0.0;
			float num2 = 0f;
			if (this.txtProductNumber.Text != "")
			{
				float num3 = 0f;
				if (this.cbbVAT.SelectedIndex == 0)
				{
					num3 = 0f;
				}
				else
				{
					if (this.cbbVAT.SelectedIndex == 1)
					{
						num3 = 5f;
					}
					else
					{
						if (this.cbbVAT.SelectedIndex == 2)
						{
							num3 = 10f;
						}
					}
				}
				try
				{
					num = double.Parse(this.txtProductNumber.Text);
				}
				catch
				{
					num = 0.0;
				}
				if (this.txtProductPrice.Text != "")
				{
					this.txtProductMoney.Text = (num * double.Parse(this.txtProductPrice.Text) * (double)(1f + num3 / 100f)).ToString();
				}
				try
				{
					num2 = float.Parse(this.txtProductPrice.Text.Replace(",", ""));
				}
				catch
				{
					num2 = 0f;
				}
				try
				{
					float num4 = (num2 + num2 * this.objPrice.getPriceOutput(num2, "percent1") / 100f) * (1f + num3 / 100f);
					this.txtProductPrice1.Text = num4.ToString();
				}
				catch
				{
					this.txtProductPrice1.Text = "0";
				}
				try
				{
					float num5 = (num2 + num2 * this.objPrice.getPriceOutput(num2, "percent2") / 100f) * (1f + num3 / 100f);
					this.txtProductPrice2.Text = num5.ToString();
				}
				catch
				{
					this.txtProductPrice2.Text = "0";
				}
			}
		}
		private void txtDebt_TextChanged(object sender, EventArgs e)
		{
			try
			{
				this.txtDebt.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.txtDebt.Text));
			}
			catch
			{
				this.txtDebt.Text = "0";
			}
		}
		private void txtDiscountIn_TextChanged(object sender, EventArgs e)
		{
			if (this.txtDiscountIn.Focus())
			{
				try
				{
					double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
					this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
				}
				catch
				{
					this.txtMoneyAfterDiscount.Text = "0";
				}
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.txtMoney.Text));
				try
				{
					double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
					this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
				}
				catch
				{
					this.txtTotalMoney.Text = "0";
				}
			}
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			frmSearchBill frmSearchBill = new frmSearchBill();
			frmSearchBill.type_Input = "IN";
			frmSearchBill.ShowDialog();
			if (frmSearchBill.sql_Search.Trim() != "")
			{
				this.getBill(frmSearchBill.sql_Search);
			}
		}
		private void btnViewAll_Click(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void cbbTypeInput_SelectedValueChanged(object sender, EventArgs e)
		{
			if (this.cbbTypeInput.SelectedValue.ToString() == "IN3")
			{
				this.objFunc.LoadComboBox("SELECT [ProID], UPPER(Name) AS Name FROM [TabPartner] WHERE [IsCustomer] = 1  AND ([Root] IS NULL OR [Root] = 0)", this.cbbProvider, "CusID", "Name");
				this.btnSelectPacket.Visible = true;
			}
			else
			{
				if (this.cbbTypeInput.SelectedValue.ToString() == "IN2")
				{
					this.btnSelectPacket.Visible = false;
					this.objFunc.LoadComboBox("SELECT [ProID], UPPER(Name) AS Name FROM [TabPartner] WHERE [IsProvider] = 1 AND [Root] = 1", this.cbbProvider, "ProID", "Name");
				}
				else
				{
					this.btnSelectPacket.Visible = false;
					this.objFunc.LoadComboBox("SELECT [ProID], UPPER(Name) AS Name FROM [TabPartner] WHERE [IsProvider] = 1  AND ([Root] IS NULL OR [Root] = 0)", this.cbbProvider, "ProID", "Name");
				}
			}
		}
		private void btnSelectPacket_Click(object sender, EventArgs e)
		{
			if (this.txtProductName.Text != "" && this.currPid != "")
			{
				frmSelectPacket frmSelectPacket = new frmSelectPacket();
				frmSelectPacket.pid = this.currPid;
				frmSelectPacket.ShowDialog();
				this.txtProductPacket.Text = frmSelectPacket.packet;
				if (this.txtProductPacket.Text != "")
				{
					this.getInformationFromPacket(this.currPid, this.txtProductPacket.Text);
				}
			}
		}
		private void getInformationFromPacket(string pid, string packet)
		{
			SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
			sqlConnection.Open();
			string cmdText = "SELECT [productPrice1],[productPrice2],[ProductDate],[ProductExpiryDate] FROM [TabDetailBill],[TabBill] WHERE [TabDetailBill].[BillID] = [TabBill].[ID] AND [TabBill].[Pid] = '" + this.cbbProvider.SelectedValue.ToString() + "'";
			SqlCommand sqlCommand = new SqlCommand(cmdText, sqlConnection);
			SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
			while (sqlDataReader.Read())
			{
				this.txtProductPrice.Text = sqlDataReader["productPrice1"].ToString();
				this.txtProductPrice1.Text = sqlDataReader["productPrice1"].ToString();
				this.txtProductPrice2.Text = sqlDataReader["productPrice2"].ToString();
				this.dtpProductDate.Value = DateTime.Parse(sqlDataReader["ProductDate"].ToString());
				this.dptProductExpiryDate.Value = DateTime.Parse(sqlDataReader["ProductExpiryDate"].ToString());
			}
			sqlDataReader.Close();
			sqlConnection.Close();
			sqlConnection.Dispose();
		}
		private void txtProductPrice_Leave(object sender, EventArgs e)
		{
			this.txtProductPrice.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductPrice1_TextChanged(object sender, EventArgs e)
		{
		}
		private void txtProductPrice1_Leave(object sender, EventArgs e)
		{
			this.txtProductPrice1.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductNumber_Leave(object sender, EventArgs e)
		{
			this.txtProductNumber.BackColor = Color.White;
			this.objFunc.txtObject_Number_Leave(sender);
		}
		private void txtProductPrice2_Leave(object sender, EventArgs e)
		{
			this.txtProductPrice2.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductPrice2_TabStopChanged(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductPrice2_TextChanged(object sender, EventArgs e)
		{
		}
		private void txtProductMoney_Leave(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void btnListUnit_Click(object sender, EventArgs e)
		{
			if (this.currPid != "")
			{
				frmSelectProductUnit frmSelectProductUnit = new frmSelectProductUnit();
				frmSelectProductUnit.Pid = int.Parse(this.currPid);
				frmSelectProductUnit.Location = new System.Drawing.Point(this.txtProductUnit.Location.X + 325, this.txtProductUnit.Location.Y + 199);
				frmSelectProductUnit.ShowDialog();
				this.txtProductUnit.Text = frmSelectProductUnit.unitName;
				this.currRate = (double)float.Parse(frmSelectProductUnit.unitNumber);
				this.txtProductPrice.Text = (this.currPrice / (double)float.Parse(frmSelectProductUnit.unitNumber)).ToString();
			}
		}
		private void cmsAddBill_Click(object sender, EventArgs e)
		{
			this.btnAdd.PerformClick();
		}
		private void cmsEditBill_Click(object sender, EventArgs e)
		{
			this.btnEdit.PerformClick();
		}
		private void cmsSaveBill_Click(object sender, EventArgs e)
		{
			this.btnSave.PerformClick();
		}
		private void cmsPrintBill_Click(object sender, EventArgs e)
		{
			this.btnPrint.PerformClick();
		}
		private void cmsDellBill_Click(object sender, EventArgs e)
		{
			this.btnDel.PerformClick();
		}
		private void cmsSearchBill_Click(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void btnSave_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsSaveBill.Enabled = this.btnSave.Enabled;
		}
		private void btnDel_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsDellBill.Enabled = this.btnDel.Enabled;
		}
		private void btnPrint_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsPrintBill.Enabled = this.btnPrint.Enabled;
		}
		private void txtProductPacket_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.dtpProductDate.Focus();
			}
		}
		private void txtProductName_DoubleClick(object sender, EventArgs e)
		{
			this.txtProductNumber.Focus();
		}
		private void txtProductNumber_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.txtProductPrice.Focus();
			}
		}
		private void txtProductPrice_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.txtProductPrice1.Focus();
			}
		}
		private void txtProductPrice2_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.cbbNational.Focus();
			}
		}
		private void cbbNational_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.txtProductPacket.Focus();
			}
		}
		private void dtpProductDate_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.dptProductExpiryDate.Focus();
			}
		}
		private void dptProductExpiryDate_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Return)
			{
				this.btnAddToBill.PerformClick();
			}
		}
		private void txtProductName_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				if (this.txtProductName.Text.Trim() != "" && this.currPid != "0" && this.currPid.Trim() != "")
				{
					this.txtProductUnit.Focus();
				}
				else
				{
					this.btnSelect.PerformClick();
				}
			}
		}
		private void txtProductUnit_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbVAT.Focus();
			}
		}
		private void cbbVAT_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductNumber.Focus();
			}
		}
		private void txtProductPrice_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductPrice1.Focus();
			}
		}
		private void txtProductPrice1_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductPrice2.Focus();
			}
		}
		private void txtProductPrice2_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbNational.Focus();
			}
		}
		private void cbbNational_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductPacket.Focus();
			}
		}
		private void txtProductPacket_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.dtpProductDate.Focus();
			}
		}
		private void dtpProductDate_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.dptProductExpiryDate.Focus();
			}
		}
		private void dptProductExpiryDate_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.btnAddToBill.PerformClick();
			}
		}
		private void txtID_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtTotalMoney.Focus();
			}
		}
		private void txtTotalMoney_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbTypeInput.Focus();
			}
		}
		private void cbbTypeInput_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbProvider.Focus();
			}
		}
		private void txtDate_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtDiscountIn.Focus();
			}
		}
		private void txtDiscountIn_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.btnSave.PerformClick();
			}
		}
		private void txtMoneyAfterDiscount_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbProvider.Focus();
			}
		}
		private void cbbProvider_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductName.Focus();
			}
		}
		private void txtNote_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtDiscountIn.Focus();
			}
		}
		private void txtDebt_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductName.Focus();
			}
		}
		private void txtProductName_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyData == Keys.Down)
			{
				if (this.txtProductName.Text.Trim() != "")
				{
					this.btnSelect.PerformClick();
				}
			}
			else
			{
				if (e.KeyData == Keys.Return)
				{
					if (this.txtProductName.Text.Trim() == "")
					{
						this.btnSelect.PerformClick();
					}
					else
					{
						this.txtProductUnit.Focus();
					}
				}
			}
		}
		private void txtProductName_Leave(object sender, EventArgs e)
		{
			if (this.currPid != "" && this.currPid != "0")
			{
				this.dptProductExpiryDate.Value = this.dtpProductDate.Value.AddDays((double)this.objProduct.getDayLive(this.currPid));
			}
			this.txtProductName.BackColor = Color.White;
		}
		private void txtProductName_Enter(object sender, EventArgs e)
		{
			this.txtProductName.BackColor = Color.Aqua;
		}
		private void txtProductUnit_Enter(object sender, EventArgs e)
		{
			this.txtProductUnit.BackColor = Color.Aqua;
		}
		private void txtProductUnit_Leave(object sender, EventArgs e)
		{
			this.txtProductUnit.BackColor = Color.White;
		}
		private void txtProductNumber_Enter(object sender, EventArgs e)
		{
			this.txtProductNumber.BackColor = Color.Aqua;
		}
		private void txtProductPrice_Enter(object sender, EventArgs e)
		{
			this.txtProductPrice.BackColor = Color.Aqua;
		}
		private void txtProductPrice1_Enter(object sender, EventArgs e)
		{
			this.txtProductPrice1.BackColor = Color.Aqua;
		}
		private void txtProductPrice2_Enter(object sender, EventArgs e)
		{
			this.txtProductPrice2.BackColor = Color.Aqua;
		}
		private void txtProductPacket_Enter(object sender, EventArgs e)
		{
			this.txtProductPacket.BackColor = Color.Aqua;
		}
		private void txtProductPacket_Leave(object sender, EventArgs e)
		{
			this.txtProductPacket.BackColor = Color.White;
		}
		private void txtID_Enter(object sender, EventArgs e)
		{
			this.txtID.BackColor = Color.Aqua;
		}
		private void txtID_Leave(object sender, EventArgs e)
		{
			this.txtID.BackColor = Color.White;
		}
		private void txtTotalMoney_Enter(object sender, EventArgs e)
		{
			this.txtTotalMoney.BackColor = Color.Aqua;
		}
		private void txtTotalMoney_Leave(object sender, EventArgs e)
		{
			this.txtTotalMoney.BackColor = Color.White;
		}
		private void txtDiscountIn_Enter(object sender, EventArgs e)
		{
			this.txtDiscountIn.BackColor = Color.Aqua;
		}
		private void txtDiscountIn_Leave(object sender, EventArgs e)
		{
			this.txtDiscountIn.BackColor = Color.White;
		}
		private void txtMoneyAfterDiscount_Enter(object sender, EventArgs e)
		{
			this.txtMoneyAfterDiscount.BackColor = Color.Aqua;
		}
		private void txtMoneyAfterDiscount_Leave(object sender, EventArgs e)
		{
			this.txtMoneyAfterDiscount.BackColor = Color.White;
			try
			{
				double num = double.Parse(this.txtMoneyAfterDiscount.Text) * 100.0 / double.Parse(this.txtMoney.Text);
				this.txtDiscountIn.Text = num.ToString();
			}
			catch
			{
				this.txtDiscountIn.Text = "0";
			}
		}
		private void txtNote_Enter(object sender, EventArgs e)
		{
			this.txtNote.BackColor = Color.Aqua;
		}
		private void txtNote_Leave(object sender, EventArgs e)
		{
			this.txtNote.BackColor = Color.White;
		}
		private void txtDebt_Enter(object sender, EventArgs e)
		{
			this.txtDebt.BackColor = Color.Aqua;
		}
		private void txtDebt_Leave(object sender, EventArgs e)
		{
			this.txtDebt.BackColor = Color.White;
		}
		private void frmInput_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				if (MessageBox.Show("Bạn có muốn ghi lại thông tin về hoá đơn hiện tại không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
				{
					e.Cancel = true;
					this.btnSave.PerformClick();
				}
			}
		}
		private void btnAddCustomer_Click(object sender, EventArgs e)
		{
			new FrmupdtProvider
			{
				FormBorderStyle = FormBorderStyle.FixedToolWindow
			}.ShowDialog();
			this.objFunc.LoadComboBox("SELECT [CusID] , UPPER(Name) AS Name  FROM [TabPartner] WHERE [IsProvider] = 1", this.cbbProvider, "ProID", "Name");
		}
		private void frmInput_Shown(object sender, EventArgs e)
		{
			this.isPostBack = true;
			this.btnAdd.PerformClick();
		}
		private void btnSearchTime_Click(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void txtMoney_TextChanged(object sender, EventArgs e)
		{
			try
			{
				double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
				this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtMoneyAfterDiscount.Text = "0";
			}
			try
			{
				double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountIn.Text) / 100.0;
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtTotalMoney.Text = "0";
			}
		}
		private void dtpProductDate_ValueChanged(object sender, EventArgs e)
		{
			if (this.currPid != "" && this.currPid != "0")
			{
				this.dptProductExpiryDate.Value = this.dtpProductDate.Value.AddDays((double)this.objProduct.getDayLive(this.currPid));
			}
		}
		private void txtMoneyAfterDiscount_TextChanged(object sender, EventArgs e)
		{
			if (this.txtMoneyAfterDiscount.Focus())
			{
			}
		}
		private void loadData(string path)
		{
			string connectionString = "Provider=Microsoft.Jet.Oledb.4.0;Data Source='" + path + "';Extended Properties=Excel 8.0";
			OleDbConnection oleDbConnection = new OleDbConnection(connectionString);
			string cmdText = "SELECT * FROM [Sheet1$]";
			OleDbCommand oleDbCommand = new OleDbCommand(cmdText, oleDbConnection);
			oleDbConnection.Open();
			DataTable dataTable = new DataTable();
			DataColumn column = new DataColumn("Pid", typeof(string));
			DataColumn column2 = new DataColumn("ProductName", typeof(string));
			DataColumn column3 = new DataColumn("ProductUnit", typeof(string));
			DataColumn column4 = new DataColumn("ProductNumber", typeof(string));
			DataColumn column5 = new DataColumn("ProductPrice", typeof(string));
			DataColumn column6 = new DataColumn("ProductMoney", typeof(string));
			DataColumn column7 = new DataColumn("Packet", typeof(string));
			DataColumn column8 = new DataColumn("ProductDate", typeof(DateTime));
			DataColumn column9 = new DataColumn("ProductExpiryDate", typeof(DateTime));
			DataColumn column10 = new DataColumn("ProductPrice1", typeof(string));
			DataColumn column11 = new DataColumn("ProductPrice2", typeof(string));
			DataColumn column12 = new DataColumn("NationalID", typeof(string));
			DataColumn column13 = new DataColumn("VAT", typeof(string));
			DataColumn column14 = new DataColumn("possName", typeof(string));
			DataColumn column15 = new DataColumn("Rate", typeof(string));
			dataTable.Columns.Add(column);
			dataTable.Columns.Add(column2);
			dataTable.Columns.Add(column3);
			dataTable.Columns.Add(column4);
			dataTable.Columns.Add(column5);
			dataTable.Columns.Add(column6);
			dataTable.Columns.Add(column7);
			dataTable.Columns.Add(column8);
			dataTable.Columns.Add(column9);
			dataTable.Columns.Add(column10);
			dataTable.Columns.Add(column11);
			dataTable.Columns.Add(column12);
			dataTable.Columns.Add(column13);
			dataTable.Columns.Add(column14);
			dataTable.Columns.Add(column15);
			OleDbDataReader oleDbDataReader = oleDbCommand.ExecuteReader();
			while (oleDbDataReader.Read())
			{
				dataTable.Rows.Add(new object[]
				{
					oleDbDataReader["Pid"].ToString(),
					oleDbDataReader["ProductName"].ToString(),
					oleDbDataReader["ProductUnit"].ToString(),
					string.Format(Program.lenAffterDecimal, double.Parse(oleDbDataReader["ProductNumber"].ToString())),
					string.Format(Program.lenAffterDecimal, double.Parse(oleDbDataReader["ProductPrice"].ToString())),
					string.Format(Program.lenAffterDecimal, double.Parse(oleDbDataReader["ProductMoney"].ToString())),
					oleDbDataReader["Packet"].ToString(),
					oleDbDataReader["ProductDate"].ToString(),
					oleDbDataReader["ProductExpiryDate"].ToString(),
					string.Format(Program.lenAffterDecimal, double.Parse(oleDbDataReader["ProductPrice1"].ToString())),
					string.Format(Program.lenAffterDecimal, double.Parse(oleDbDataReader["ProductPrice2"].ToString())),
					oleDbDataReader["NationalID"].ToString(),
					oleDbDataReader["VAT"].ToString(),
					oleDbDataReader["PossName"],
					oleDbDataReader["Rate"].ToString()
				});
			}
			oleDbDataReader.Close();
			oleDbConnection.Close();
			oleDbConnection.Dispose();
			this.objTable = dataTable;
			this.dgvProduct.DataSource = this.objTable;
			this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
		}
		private void ctmDirAddProduct_Click(object sender, EventArgs e)
		{
			new FrmupdtProduct
			{
				FormBorderStyle = FormBorderStyle.FixedToolWindow,
				StartPosition = FormStartPosition.CenterScreen,
				Size = new Size(900, 600)
			}.ShowDialog();
		}
		private void ctmDirAddUnit_Click(object sender, EventArgs e)
		{
			new FrmupdtUnitproduct
			{
				FormBorderStyle = FormBorderStyle.FixedToolWindow,
				StartPosition = FormStartPosition.CenterScreen,
				Size = new Size(500, 400)
			}.ShowDialog();
		}
		private void ctmDirAddRegion_Click(object sender, EventArgs e)
		{
			new frmNational
			{
				FormBorderStyle = FormBorderStyle.FixedToolWindow,
				StartPosition = FormStartPosition.CenterScreen,
				Size = new Size(500, 400)
			}.ShowDialog();
			this.cbbNational.DataSource = null;
			this.cbbNational.Items.Clear();
			this.objFunc.LoadComboBox("SELECT [ID], UPPER(Name) AS Name FROM [TabNational] ORDER BY [Name]", this.cbbNational, "ID", "Name");
		}
		private void ctmDirAddPosition_Click(object sender, EventArgs e)
		{
			frmupdtPossition frmupdtPossition = new frmupdtPossition();
			frmupdtPossition.ShowDialog();
			this.cbbPossition.DataSource = null;
			this.cbbPossition.Items.Clear();
			this.objFunc.LoadComboBox("SELECT ID, UPPER(Name) AS Name FROM [TabPossition]", this.cbbPossition, "ID", "Name");
		}
		private void txtBarcode_KeyDown(object sender, KeyEventArgs e)
		{
			try
			{
				this.useBarcode = true;
				if (!(this.txtBarcode.Text.Trim() == ""))
				{
					if (e.KeyCode == Keys.Return)
					{
						if (this.btnSave.Enabled)
						{
							string text = "";
							string text2 = "";
							string text3 = "";
							this.objProduct.getInformationFromBarcodeForInput(this.txtBarcode.Text, ref this.currPid, this.txtProductName, this.txtProductUnit, this.lblPossName, ref text, ref text2, ref text3);
							if (this.currPid != "")
							{
								if (!this.AllowSellSuppen)
								{
									if (this.objProduct.checkForSuppend(this.currPid, "0"))
									{
										MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + this.txtProductName.Text + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể nhập kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
										return;
									}
								}
								if (this.BasePrice)
								{
									this.txtProductPrice.Text = this.objProduct.getPriceInCurrent(this.currPid).ToString();
									this.txtProductPrice1.Text = this.objProduct.getPriceOutTradeCurrent(this.currPid).ToString();
									this.txtProductPrice2.Text = this.objProduct.getPriceOutRetailCurrent(this.currPid).ToString();
								}
								else
								{
									this.txtProductPrice.Text = text;
									this.txtProductPrice1.Text = text2;
									this.txtProductPrice2.Text = text3;
								}
								this.currPrice = (double)float.Parse(this.txtProductPrice.Text.Replace(",", ""));
								this.cbbPossition.Text = this.lblPossName.Text;
								this.currRate = 1.0;
								this.txtProductNumber.Focus();
							}
							else
							{
								if (MessageBox.Show("Không tìm thấy sản phẩm nào liên quan với mã vạch đã chỉ ra\r\n\r\nBạn có muốn thêm sản phẩm hiện tại vào danh mục không ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
								{
									FrmupdtProduct frmupdtProduct = new FrmupdtProduct();
									frmupdtProduct.FormBorderStyle = FormBorderStyle.FixedToolWindow;
									frmupdtProduct.StartPosition = FormStartPosition.CenterScreen;
									frmupdtProduct.Size = new Size(900, 600);
									frmupdtProduct.txtBarcode.Text = this.txtBarcode.Text;
									this.groupBox2.Focus();
									frmupdtProduct.txtName.Focus();
									frmupdtProduct.ShowDialog();
								}
							}
						}
					}
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}
		private void btnMore_Click(object sender, EventArgs e)
		{
			frmInputMoreInfo frmInputMoreInfo = new frmInputMoreInfo();
			frmInputMoreInfo.Location = new System.Drawing.Point(this.groupBox2.Location.X + this.btnMore.Location.X - 358, this.groupBox2.Location.X + this.btnMore.Location.Y - 54);
			frmInputMoreInfo.txtRegisters.Text = this.currIdRegisters;
			frmInputMoreInfo.txtControl.Text = this.currIdControl;
			frmInputMoreInfo.cbbBisMake.SelectedValue = this.currIdBisMake;
			frmInputMoreInfo.cbbBisImport.SelectedValue = this.currIdBisImport;
			frmInputMoreInfo.ShowDialog();
			if (frmInputMoreInfo.hasModife)
			{
				this.currIdRegisters = frmInputMoreInfo.txtRegisters.Text;
				this.currIdControl = frmInputMoreInfo.txtControl.Text;
				this.currIdBisMake = frmInputMoreInfo.cbbBisMake.SelectedValue.ToString();
				this.currIdBisImport = frmInputMoreInfo.cbbBisImport.SelectedValue.ToString();
			}
		}
		private void ctmJustBillAdd_Click(object sender, EventArgs e)
		{
			this.btnAdd.PerformClick();
		}
		private void ctmJustBillEdit_Click(object sender, EventArgs e)
		{
			this.btnEdit.PerformClick();
		}
		private void ctmJustBillPrint_Click(object sender, EventArgs e)
		{
			this.btnPrint.PerformClick();
		}
		private void ctmJustBillDel_Click(object sender, EventArgs e)
		{
			this.btnDel.PerformClick();
		}
		private void ctmJustBillSearch_Click(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void label28_DoubleClick(object sender, EventArgs e)
		{
			if (this.dgvBill.RowCount > 0)
			{
				frmSlideShow frmSlideShow = new frmSlideShow();
				frmSlideShow.ShowDialog();
				if (frmSlideShow.OKSelect && frmSlideShow.nmUSecond.Value > 0m)
				{
					this.updateDataWithSlideShow = frmSlideShow.ckbSaveData.Checked;
					if (frmSlideShow.rdbUp.Checked)
					{
						this.Direction = 1;
						this.slideShowIndex = -1;
					}
					else
					{
						this.Direction = -1;
						this.slideShowIndex = this.dgvBill.RowCount;
					}
					this.timer1.Interval = (int)frmSlideShow.nmUSecond.Value * 1000;
					this.timer1.Enabled = true;
					this.timer1.Start();
					this.btnStopSlide.Visible = true;
				}
			}
		}
		private void btnStopSlide_Click(object sender, EventArgs e)
		{
			this.timer1.Stop();
			this.btnStopSlide.Visible = false;
		}
		public void SetFocusDatagridview(DataGridView dgv, int CellPosition)
		{
			try
			{
				dgv.FirstDisplayedScrollingRowIndex = CellPosition;
				dgv.Rows[CellPosition].Selected = true;
				dgv.CurrentCell = dgv.Rows[CellPosition].Cells[0];
				dgv.BeginEdit(false);
			}
			catch
			{
				this.timer2.Stop();
				this.timer1.Stop();
				this.btnStopSlide.Visible = false;
				this.btnEdit.Enabled = true;
				this.btnSave.Enabled = false;
			}
		}
		private void timer1_Tick(object sender, EventArgs e)
		{
			if (this.Direction > 0 && this.slideShowIndex < this.dgvBill.RowCount - 1)
			{
				this.slideShowIndex += this.Direction;
			}
			else
			{
				if (this.Direction >= 0 || this.slideShowIndex <= 0)
				{
					this.timer2.Stop();
					this.timer1.Stop();
					this.btnStopSlide.Visible = false;
					this.btnEdit.Enabled = true;
					this.btnSave.Enabled = false;
					return;
				}
				this.slideShowIndex += this.Direction;
			}
			this.btnStopSlide.Text = (this.slideShowIndex + 1).ToString() + " / " + this.dgvBill.RowCount.ToString() + "  Dừng xem";
			this.SetFocusDatagridview(this.dgvBill, this.slideShowIndex);
			if (this.updateDataWithSlideShow)
			{
				this.saveIntervalCondition = 0;
				this.saveInterval = this.timer1.Interval / 1000 - 1;
				this.btnEdit.PerformClick();
				this.timer2.Enabled = true;
				this.timer2.Start();
			}
		}
		private void timer2_Tick(object sender, EventArgs e)
		{
			this.saveIntervalCondition++;
			if (this.saveIntervalCondition == this.saveInterval)
			{
				this.btnSave.PerformClick();
			}
		}
		private void txtItemTotalMoney_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductPrice.Focus();
			}
		}
		private void txtItemTotalMoney_Enter(object sender, EventArgs e)
		{
			this.txtItemTotalMoney.BackColor = Color.Aqua;
		}
		private void txtItemTotalMoney_Leave(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
			this.txtItemTotalMoney.BackColor = Color.White;
		}
		private void txtItemTotalMoney_TextChanged(object sender, EventArgs e)
		{
			float num = 0f;
			if (this.txtItemTotalMoney.Text.Trim() != "" && this.txtItemTotalMoney.Text.Trim() != "0")
			{
				try
				{
					num = float.Parse(this.txtItemTotalMoney.Text.Replace(",", "")) / float.Parse(this.txtProductNumber.Text.Replace(",", ""));
				}
				catch
				{
					num = 0f;
				}
				this.txtProductPrice.Text = string.Format(Program.lenAffterDecimal, num);
			}
		}
		private double caculaterTotalVAT()
		{
			double num = 0.0;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				num += double.Parse(this.objTable.Rows[i]["VATasMoney"].ToString().Replace(",", ""));
			}
			return num;
		}
		private void txtProductUnit_DoubleClick(object sender, EventArgs e)
		{
			if (this.btnSave.Enabled && this.btnListUnit.Enabled)
			{
				this.btnListUnit.PerformClick();
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle9 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmInput));
			DataGridViewCellStyle dataGridViewCellStyle10 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle11 = new DataGridViewCellStyle();
			this.groupBox1 = new GroupBox();
			this.label23 = new Label();
			this.cbbWareHouse = new ComboBox();
			this.btnAddCustomer = new Button();
			this.txtDebt = new TextBox();
			this.label6 = new Label();
			this.cbbProvider = new ComboBox();
			this.label5 = new Label();
			this.label4 = new Label();
			this.label2 = new Label();
			this.txtDate = new DateTimePicker();
			this.txtID = new TextBox();
			this.label1 = new Label();
			this.cbbTypeInput = new ComboBox();
			this.label25 = new Label();
			this.txtMoneyAfterDiscount = new TextBox();
			this.txtDiscountIn = new TextBox();
			this.label22 = new Label();
			this.label8 = new Label();
			this.txtTotalMoney = new TextBox();
			this.label7 = new Label();
			this.txtNote = new TextBox();
			this.dgvProduct = new DataGridView();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.Column1 = new DataGridViewTextBoxColumn();
			this.Column3 = new DataGridViewTextBoxColumn();
			this.Column4 = new DataGridViewTextBoxColumn();
			this.Column5 = new DataGridViewTextBoxColumn();
			this.Column18 = new DataGridViewTextBoxColumn();
			this.VATasMoney = new DataGridViewTextBoxColumn();
			this.Column6 = new DataGridViewTextBoxColumn();
			this.Column7 = new DataGridViewTextBoxColumn();
			this.Column8 = new DataGridViewTextBoxColumn();
			this.Column9 = new DataGridViewTextBoxColumn();
			this.Column15 = new DataGridViewTextBoxColumn();
			this.Column16 = new DataGridViewTextBoxColumn();
			this.Column17 = new DataGridViewTextBoxColumn();
			this.possName = new DataGridViewTextBoxColumn();
			this.IdRegisters = new DataGridViewTextBoxColumn();
			this.IdControl = new DataGridViewTextBoxColumn();
			this.IdBisMake = new DataGridViewTextBoxColumn();
			this.IdBisImport = new DataGridViewTextBoxColumn();
			this.BarCode = new DataGridViewTextBoxColumn();
			this.cmsBill = new ContextMenuStrip(this.components);
			this.cmsAddProduct = new ToolStripMenuItem();
			this.toolStripSeparator4 = new ToolStripSeparator();
			this.cmsDelProduct = new ToolStripMenuItem();
			this.toolStripSeparator1 = new ToolStripSeparator();
			this.cmsAddBill = new ToolStripMenuItem();
			this.cmsEditBill = new ToolStripMenuItem();
			this.toolStripSeparator2 = new ToolStripSeparator();
			this.cmsSaveBill = new ToolStripMenuItem();
			this.cmsPrintBill = new ToolStripMenuItem();
			this.cmsDellBill = new ToolStripMenuItem();
			this.toolStripSeparator3 = new ToolStripSeparator();
			this.cmsSearchBill = new ToolStripMenuItem();
			this.groupBox2 = new GroupBox();
			this.label28 = new Label();
			this.label12 = new Label();
			this.txtBarcode = new TextBox();
			this.label29 = new Label();
			this.txtItemTotalMoney = new TextBox();
			this.label20 = new Label();
			this.btnMore = new Button();
			this.ckbPossition = new CheckBox();
			this.cbbNational = new ComboBox();
			this.ctmDir = new ContextMenuStrip(this.components);
			this.ctmDirAddProduct = new ToolStripMenuItem();
			this.ctmDirAddUnit = new ToolStripMenuItem();
			this.ctmDirAddRegion = new ToolStripMenuItem();
			this.ctmDirAddPosition = new ToolStripMenuItem();
			this.btnSelectPacket = new Button();
			this.label21 = new Label();
			this.cbbVAT = new ComboBox();
			this.cbbPossition = new ComboBox();
			this.txtProductPrice2 = new TextBox();
			this.btnSelect = new Button();
			this.lblPossName = new Label();
			this.txtProductPrice1 = new TextBox();
			this.label18 = new Label();
			this.dptProductExpiryDate = new DateTimePicker();
			this.label16 = new Label();
			this.dtpProductDate = new DateTimePicker();
			this.label15 = new Label();
			this.txtProductPacket = new TextBox();
			this.label14 = new Label();
			this.txtProductPrice = new TextBox();
			this.label13 = new Label();
			this.txtProductNumber = new TextBox();
			this.label11 = new Label();
			this.txtProductUnit = new TextBox();
			this.label10 = new Label();
			this.txtProductName = new TextBox();
			this.label9 = new Label();
			this.label19 = new Label();
			this.label24 = new Label();
			this.btnListUnit = new Button();
			this.txtProductMoney = new TextBox();
			this.btnAddToBill = new Button();
			this.btnAdd = new Button();
			this.btnEdit = new Button();
			this.btnSave = new Button();
			this.btnPrint = new Button();
			this.btnDel = new Button();
			this.btnClose = new Button();
			this.dgvBill = new DataGridView();
			this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn7 = new DataGridViewTextBoxColumn();
			this.Column10 = new DataGridViewTextBoxColumn();
			this.Column11 = new DataGridViewTextBoxColumn();
			this.Column12 = new DataGridViewTextBoxColumn();
			this.Column13 = new DataGridViewTextBoxColumn();
			this.Column14 = new DataGridViewTextBoxColumn();
			this.Column19 = new DataGridViewTextBoxColumn();
			this.Column20 = new DataGridViewTextBoxColumn();
			this.Column21 = new DataGridViewTextBoxColumn();
			this.ctmJustBill = new ContextMenuStrip(this.components);
			this.ctmJustBillAdd = new ToolStripMenuItem();
			this.ctmJustBillEdit = new ToolStripMenuItem();
			this.ctmJustBillPrint = new ToolStripMenuItem();
			this.toolStripSeparator5 = new ToolStripSeparator();
			this.ctmJustBillDel = new ToolStripMenuItem();
			this.toolStripSeparator6 = new ToolStripSeparator();
			this.ctmJustBillSearch = new ToolStripMenuItem();
			this.groupBox3 = new GroupBox();
			this.label3 = new Label();
			this.dtpTo = new DateTimePicker();
			this.dtpFrom = new DateTimePicker();
			this.label17 = new Label();
			this.btnSearchTime = new Button();
			this.btnSearch = new Button();
			this.txtMoney = new TextBox();
			this.label27 = new Label();
			this.toolTip1 = new ToolTip(this.components);
			this.label26 = new Label();
			this.timer1 = new System.Windows.Forms.Timer(this.components);
			this.btnStopSlide = new Button();
			this.timer2 = new System.Windows.Forms.Timer(this.components);
			this.txtTotalVAT = new TextBox();
			this.label30 = new Label();
			this.label31 = new Label();
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			this.cmsBill.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.ctmDir.SuspendLayout();
			((ISupportInitialize)this.dgvBill).BeginInit();
			this.ctmJustBill.SuspendLayout();
			this.groupBox3.SuspendLayout();
			base.SuspendLayout();
			this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.label23);
			this.groupBox1.Controls.Add(this.cbbWareHouse);
			this.groupBox1.Controls.Add(this.btnAddCustomer);
			this.groupBox1.Controls.Add(this.txtDebt);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.cbbProvider);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.txtDate);
			this.groupBox1.Controls.Add(this.txtID);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.cbbTypeInput);
			this.groupBox1.Controls.Add(this.label25);
			this.groupBox1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new System.Drawing.Point(6, 5);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(915, 86);
			this.groupBox1.TabIndex = 1;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin đơn hàng";
			this.label23.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label23.AutoSize = true;
			this.label23.BackColor = SystemColors.ButtonFace;
			this.label23.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label23.ForeColor = SystemColors.MenuText;
			this.label23.Location = new System.Drawing.Point(603, 56);
			this.label23.Name = "label23";
			this.label23.Size = new Size(66, 15);
			this.label23.TabIndex = 83;
			this.label23.Text = "Kho hàng :";
			this.label23.TextAlign = ContentAlignment.MiddleRight;
			this.cbbWareHouse.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.cbbWareHouse.BackColor = Color.White;
			this.cbbWareHouse.Cursor = Cursors.Hand;
			this.cbbWareHouse.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbWareHouse.FlatStyle = FlatStyle.Flat;
			this.cbbWareHouse.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbWareHouse.FormattingEnabled = true;
			this.cbbWareHouse.Location = new System.Drawing.Point(674, 51);
			this.cbbWareHouse.Name = "cbbWareHouse";
			this.cbbWareHouse.Size = new Size(235, 23);
			this.cbbWareHouse.TabIndex = 699;
			this.btnAddCustomer.BackColor = SystemColors.ButtonFace;
			this.btnAddCustomer.FlatAppearance.BorderColor = Color.FromArgb(192, 192, 255);
			this.btnAddCustomer.FlatStyle = FlatStyle.Flat;
			this.btnAddCustomer.Font = new Font("Arial", 9f, FontStyle.Bold | FontStyle.Italic, GraphicsUnit.Point, 163);
			this.btnAddCustomer.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnAddCustomer.Location = new System.Drawing.Point(460, 53);
			this.btnAddCustomer.Name = "btnAddCustomer";
			this.btnAddCustomer.Size = new Size(138, 24);
			this.btnAddCustomer.TabIndex = 81;
			this.btnAddCustomer.Text = "Thêm nhà cung cấp";
			this.toolTip1.SetToolTip(this.btnAddCustomer, "Thêm mới Nhà cung cấp");
			this.btnAddCustomer.UseVisualStyleBackColor = false;
			this.btnAddCustomer.Click += new EventHandler(this.btnAddCustomer_Click);
			this.txtDebt.BackColor = SystemColors.ButtonFace;
			this.txtDebt.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtDebt.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtDebt.Location = new System.Drawing.Point(330, 54);
			this.txtDebt.Name = "txtDebt";
			this.txtDebt.ReadOnly = true;
			this.txtDebt.Size = new Size(124, 22);
			this.txtDebt.TabIndex = 13;
			this.txtDebt.Text = "0";
			this.txtDebt.TextAlign = HorizontalAlignment.Center;
			this.txtDebt.TextChanged += new EventHandler(this.txtDebt_TextChanged);
			this.txtDebt.Leave += new EventHandler(this.txtDebt_Leave);
			this.txtDebt.KeyPress += new KeyPressEventHandler(this.txtDebt_KeyPress);
			this.txtDebt.Enter += new EventHandler(this.txtDebt_Enter);
			this.label6.AutoSize = true;
			this.label6.BackColor = SystemColors.ButtonFace;
			this.label6.Font = new Font("Arial", 9f, FontStyle.Bold);
			this.label6.ForeColor = SystemColors.MenuText;
			this.label6.Location = new System.Drawing.Point(261, 57);
			this.label6.Name = "label6";
			this.label6.Size = new Size(61, 15);
			this.label6.TabIndex = 12;
			this.label6.Text = "Công nợ :";
			this.label6.TextAlign = ContentAlignment.MiddleRight;
			this.cbbProvider.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.cbbProvider.BackColor = Color.White;
			this.cbbProvider.Cursor = Cursors.Hand;
			this.cbbProvider.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbProvider.FlatStyle = FlatStyle.Flat;
			this.cbbProvider.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbProvider.FormattingEnabled = true;
			this.cbbProvider.Location = new System.Drawing.Point(327, 22);
			this.cbbProvider.Name = "cbbProvider";
			this.cbbProvider.Size = new Size(271, 23);
			this.cbbProvider.TabIndex = 4;
			this.cbbProvider.SelectedIndexChanged += new EventHandler(this.cbbProvider_SelectedIndexChanged);
			this.cbbProvider.KeyPress += new KeyPressEventHandler(this.cbbProvider_KeyPress);
			this.cbbProvider.SelectedValueChanged += new EventHandler(this.cbbProvider_SelectedIndexChanged);
			this.label5.AutoSize = true;
			this.label5.BackColor = SystemColors.ButtonFace;
			this.label5.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label5.ForeColor = SystemColors.MenuText;
			this.label5.Location = new System.Drawing.Point(232, 25);
			this.label5.Name = "label5";
			this.label5.Size = new Size(90, 15);
			this.label5.TabIndex = 10;
			this.label5.Text = "Nhà cung cấp :";
			this.label5.TextAlign = ContentAlignment.MiddleRight;
			this.label4.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label4.AutoSize = true;
			this.label4.BackColor = SystemColors.ButtonFace;
			this.label4.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label4.ForeColor = SystemColors.MenuText;
			this.label4.Location = new System.Drawing.Point(604, 26);
			this.label4.Name = "label4";
			this.label4.Size = new Size(66, 15);
			this.label4.TabIndex = 4;
			this.label4.Text = "Quy cách :";
			this.label4.TextAlign = ContentAlignment.MiddleRight;
			this.label2.AutoSize = true;
			this.label2.BackColor = SystemColors.ButtonFace;
			this.label2.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label2.ForeColor = SystemColors.MenuText;
			this.label2.Location = new System.Drawing.Point(33, 57);
			this.label2.Name = "label2";
			this.label2.Size = new Size(72, 15);
			this.label2.TabIndex = 3;
			this.label2.Text = "Ngày nhập :";
			this.label2.TextAlign = ContentAlignment.MiddleRight;
			this.txtDate.CustomFormat = "dd/MM/yyyy";
			this.txtDate.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtDate.Format = DateTimePickerFormat.Custom;
			this.txtDate.Location = new System.Drawing.Point(109, 54);
			this.txtDate.Name = "txtDate";
			this.txtDate.Size = new Size(111, 22);
			this.txtDate.TabIndex = 3;
			this.txtDate.KeyPress += new KeyPressEventHandler(this.txtDate_KeyPress);
			this.txtID.BackColor = Color.White;
			this.txtID.CharacterCasing = CharacterCasing.Upper;
			this.txtID.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.txtID.Location = new System.Drawing.Point(109, 23);
			this.txtID.Name = "txtID";
			this.txtID.ReadOnly = true;
			this.txtID.Size = new Size(111, 21);
			this.txtID.TabIndex = 2;
			this.txtID.Leave += new EventHandler(this.txtID_Leave);
			this.txtID.KeyPress += new KeyPressEventHandler(this.txtID_KeyPress);
			this.txtID.Enter += new EventHandler(this.txtID_Enter);
			this.label1.AutoSize = true;
			this.label1.BackColor = SystemColors.ButtonFace;
			this.label1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label1.ForeColor = SystemColors.MenuText;
			this.label1.Location = new System.Drawing.Point(27, 25);
			this.label1.Name = "label1";
			this.label1.Size = new Size(78, 15);
			this.label1.TabIndex = 0;
			this.label1.Text = "Số hoá đơn :";
			this.label1.TextAlign = ContentAlignment.MiddleRight;
			this.cbbTypeInput.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.cbbTypeInput.BackColor = Color.White;
			this.cbbTypeInput.Cursor = Cursors.Hand;
			this.cbbTypeInput.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbTypeInput.FlatStyle = FlatStyle.Flat;
			this.cbbTypeInput.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbTypeInput.FormattingEnabled = true;
			this.cbbTypeInput.Location = new System.Drawing.Point(674, 22);
			this.cbbTypeInput.Name = "cbbTypeInput";
			this.cbbTypeInput.Size = new Size(235, 23);
			this.cbbTypeInput.TabIndex = 5;
			this.cbbTypeInput.KeyPress += new KeyPressEventHandler(this.cbbTypeInput_KeyPress);
			this.cbbTypeInput.SelectedValueChanged += new EventHandler(this.cbbTypeInput_SelectedValueChanged);
			this.label25.BackColor = Color.White;
			this.label25.Font = new Font("Arial", 9f, FontStyle.Bold);
			this.label25.ForeColor = SystemColors.MenuText;
			this.label25.Location = new System.Drawing.Point(327, 51);
			this.label25.Name = "label25";
			this.label25.Size = new Size(273, 28);
			this.label25.TabIndex = 700;
			this.label25.TextAlign = ContentAlignment.MiddleRight;
			this.txtMoneyAfterDiscount.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtMoneyAfterDiscount.BackColor = Color.White;
			this.txtMoneyAfterDiscount.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtMoneyAfterDiscount.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtMoneyAfterDiscount.Location = new System.Drawing.Point(608, 521);
			this.txtMoneyAfterDiscount.Name = "txtMoneyAfterDiscount";
			this.txtMoneyAfterDiscount.Size = new Size(78, 22);
			this.txtMoneyAfterDiscount.TabIndex = 21;
			this.txtMoneyAfterDiscount.Text = "0";
			this.txtMoneyAfterDiscount.TextAlign = HorizontalAlignment.Right;
			this.txtMoneyAfterDiscount.Leave += new EventHandler(this.txtMoneyAfterDiscount_Leave);
			this.txtMoneyAfterDiscount.KeyPress += new KeyPressEventHandler(this.txtMoneyAfterDiscount_KeyPress);
			this.txtMoneyAfterDiscount.Enter += new EventHandler(this.txtMoneyAfterDiscount_Enter);
			this.txtDiscountIn.AcceptsReturn = true;
			this.txtDiscountIn.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtDiscountIn.BackColor = Color.White;
			this.txtDiscountIn.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtDiscountIn.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtDiscountIn.Location = new System.Drawing.Point(580, 521);
			this.txtDiscountIn.Name = "txtDiscountIn";
			this.txtDiscountIn.ReadOnly = true;
			this.txtDiscountIn.Size = new Size(26, 22);
			this.txtDiscountIn.TabIndex = 20;
			this.txtDiscountIn.Text = "0";
			this.txtDiscountIn.TextAlign = HorizontalAlignment.Right;
			this.txtDiscountIn.TextChanged += new EventHandler(this.txtDiscountIn_TextChanged);
			this.txtDiscountIn.Leave += new EventHandler(this.txtDiscountIn_Leave);
			this.txtDiscountIn.KeyPress += new KeyPressEventHandler(this.txtDiscountIn_KeyPress);
			this.txtDiscountIn.Enter += new EventHandler(this.txtDiscountIn_Enter);
			this.label22.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label22.AutoSize = true;
			this.label22.BackColor = Color.White;
			this.label22.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label22.ForeColor = SystemColors.MenuText;
			this.label22.Location = new System.Drawing.Point(463, 524);
			this.label22.Name = "label22";
			this.label22.Size = new Size(114, 16);
			this.label22.TabIndex = 17;
			this.label22.Text = "Chiết khấu [ % ] :";
			this.label8.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label8.BackColor = SystemColors.ButtonFace;
			this.label8.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label8.ForeColor = SystemColors.MenuText;
			this.label8.Location = new System.Drawing.Point(239, 501);
			this.label8.Name = "label8";
			this.label8.Size = new Size(218, 20);
			this.label8.TabIndex = 16;
			this.label8.Text = "Diễn giải";
			this.label8.TextAlign = ContentAlignment.MiddleCenter;
			this.txtTotalMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtTotalMoney.BackColor = Color.White;
			this.txtTotalMoney.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtTotalMoney.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtTotalMoney.Location = new System.Drawing.Point(809, 521);
			this.txtTotalMoney.Name = "txtTotalMoney";
			this.txtTotalMoney.ReadOnly = true;
			this.txtTotalMoney.Size = new Size(106, 22);
			this.txtTotalMoney.TabIndex = 150;
			this.txtTotalMoney.Text = "0";
			this.txtTotalMoney.TextAlign = HorizontalAlignment.Right;
			this.txtTotalMoney.Leave += new EventHandler(this.txtTotalMoney_Leave);
			this.txtTotalMoney.KeyPress += new KeyPressEventHandler(this.txtTotalMoney_KeyPress);
			this.txtTotalMoney.Enter += new EventHandler(this.txtTotalMoney_Enter);
			this.label7.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label7.AutoSize = true;
			this.label7.BackColor = Color.White;
			this.label7.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label7.ForeColor = SystemColors.MenuText;
			this.label7.Location = new System.Drawing.Point(688, 500);
			this.label7.Name = "label7";
			this.label7.Size = new Size(117, 16);
			this.label7.TabIndex = 14;
			this.label7.Text = "Cộng thành tiền :";
			this.txtNote.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.txtNote.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtNote.Location = new System.Drawing.Point(239, 521);
			this.txtNote.Name = "txtNote";
			this.txtNote.Size = new Size(218, 22);
			this.txtNote.TabIndex = 19;
			this.txtNote.Leave += new EventHandler(this.txtNote_Leave);
			this.txtNote.KeyPress += new KeyPressEventHandler(this.txtNote_KeyPress);
			this.txtNote.Enter += new EventHandler(this.txtNote_Enter);
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			this.dgvProduct.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
			dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle2.BackColor = SystemColors.ButtonFace;
			dataGridViewCellStyle2.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle2.ForeColor = SystemColors.WindowText;
			dataGridViewCellStyle2.SelectionBackColor = SystemColors.Highlight;
			dataGridViewCellStyle2.SelectionForeColor = SystemColors.HighlightText;
			dataGridViewCellStyle2.WrapMode = DataGridViewTriState.True;
			this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
			this.dgvProduct.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.Column2,
				this.Column1,
				this.Column3,
				this.Column4,
				this.Column5,
				this.Column18,
				this.VATasMoney,
				this.Column6,
				this.Column7,
				this.Column8,
				this.Column9,
				this.Column15,
				this.Column16,
				this.Column17,
				this.possName,
				this.IdRegisters,
				this.IdControl,
				this.IdBisMake,
				this.IdBisImport,
				this.BarCode
			});
			this.dgvProduct.ContextMenuStrip = this.cmsBill;
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(231, 257);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvProduct.RowTemplate.DefaultCellStyle.BackColor = Color.White;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(690, 230);
			this.dgvProduct.TabIndex = 18;
			this.dgvProduct.CellClick += new DataGridViewCellEventHandler(this.dgvProduct_CellEnter);
			this.dgvProduct.KeyDown += new KeyEventHandler(this.dgvProduct_KeyDown);
			this.dgvProduct.CellEnter += new DataGridViewCellEventHandler(this.dgvProduct_CellEnter);
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column2.DataPropertyName = "productName";
			this.Column2.HeaderText = "Sản phẩm";
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column1.DataPropertyName = "Packet";
			this.Column1.HeaderText = "Số lô";
			this.Column1.MinimumWidth = 100;
			this.Column1.Name = "Column1";
			this.Column1.ReadOnly = true;
			this.Column1.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column3.DataPropertyName = "productUnit";
			this.Column3.HeaderText = "Đơn vị tính";
			this.Column3.MinimumWidth = 110;
			this.Column3.Name = "Column3";
			this.Column3.ReadOnly = true;
			this.Column3.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column3.Width = 110;
			this.Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column4.DataPropertyName = "productNumber";
			dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle3.Format = "N0";
			dataGridViewCellStyle3.NullValue = "0";
			this.Column4.DefaultCellStyle = dataGridViewCellStyle3;
			this.Column4.HeaderText = "Số lượng";
			this.Column4.MinimumWidth = 85;
			this.Column4.Name = "Column4";
			this.Column4.ReadOnly = true;
			this.Column4.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column4.Width = 85;
			this.Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column5.DataPropertyName = "productPrice";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle4.Format = "N0";
			dataGridViewCellStyle4.NullValue = null;
			this.Column5.DefaultCellStyle = dataGridViewCellStyle4;
			this.Column5.HeaderText = "Đơn giá";
			this.Column5.MinimumWidth = 80;
			this.Column5.Name = "Column5";
			this.Column5.ReadOnly = true;
			this.Column5.Width = 80;
			this.Column18.DataPropertyName = "VAT";
			dataGridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle5.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle5.ForeColor = Color.Blue;
			this.Column18.DefaultCellStyle = dataGridViewCellStyle5;
			this.Column18.HeaderText = "VAT";
			this.Column18.MinimumWidth = 40;
			this.Column18.Name = "Column18";
			this.Column18.ReadOnly = true;
			this.Column18.Visible = false;
			this.Column18.Width = 40;
			this.VATasMoney.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.VATasMoney.DataPropertyName = "VATasMoney";
			dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle6.Format = "N2";
			dataGridViewCellStyle6.NullValue = "0";
			this.VATasMoney.DefaultCellStyle = dataGridViewCellStyle6;
			this.VATasMoney.HeaderText = "VAT";
			this.VATasMoney.MinimumWidth = 85;
			this.VATasMoney.Name = "VATasMoney";
			this.VATasMoney.ReadOnly = true;
			this.VATasMoney.Width = 85;
			this.Column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column6.DataPropertyName = "ProductMoney";
			dataGridViewCellStyle7.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle7.Format = "N2";
			dataGridViewCellStyle7.NullValue = "0";
			this.Column6.DefaultCellStyle = dataGridViewCellStyle7;
			this.Column6.HeaderText = "Thành tiền";
			this.Column6.MinimumWidth = 110;
			this.Column6.Name = "Column6";
			this.Column6.ReadOnly = true;
			this.Column6.Width = 110;
			this.Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column7.DataPropertyName = "ProductDate";
			dataGridViewCellStyle8.Format = "dd/MM/yyyy";
			this.Column7.DefaultCellStyle = dataGridViewCellStyle8;
			this.Column7.HeaderText = "Ngày SX";
			this.Column7.MinimumWidth = 80;
			this.Column7.Name = "Column7";
			this.Column7.ReadOnly = true;
			this.Column7.Visible = false;
			this.Column7.Width = 80;
			this.Column8.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column8.DataPropertyName = "ProductExpiryDate";
			dataGridViewCellStyle9.Format = "dd/MM/yyyy";
			this.Column8.DefaultCellStyle = dataGridViewCellStyle9;
			this.Column8.HeaderText = "Hạn dùng";
			this.Column8.MinimumWidth = 90;
			this.Column8.Name = "Column8";
			this.Column8.ReadOnly = true;
			this.Column8.Visible = false;
			this.Column8.Width = 90;
			this.Column9.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column9.DataPropertyName = "Pid";
			this.Column9.HeaderText = "Mã sản phẩm";
			this.Column9.Name = "Column9";
			this.Column9.ReadOnly = true;
			this.Column9.Visible = false;
			this.Column15.DataPropertyName = "ProductPrice1";
			this.Column15.HeaderText = "Giá bán buôn";
			this.Column15.Name = "Column15";
			this.Column15.ReadOnly = true;
			this.Column15.Visible = false;
			this.Column16.DataPropertyName = "ProductPrice2";
			this.Column16.HeaderText = "Giá bán lẻ";
			this.Column16.Name = "Column16";
			this.Column16.ReadOnly = true;
			this.Column16.Visible = false;
			this.Column17.DataPropertyName = "NationalID";
			this.Column17.HeaderText = "Xuất xứ";
			this.Column17.Name = "Column17";
			this.Column17.ReadOnly = true;
			this.Column17.Visible = false;
			this.possName.DataPropertyName = "possName";
			this.possName.HeaderText = "possName";
			this.possName.Name = "possName";
			this.possName.ReadOnly = true;
			this.possName.Visible = false;
			this.IdRegisters.DataPropertyName = "IdRegisters";
			this.IdRegisters.HeaderText = "IdRegisters";
			this.IdRegisters.Name = "IdRegisters";
			this.IdRegisters.ReadOnly = true;
			this.IdRegisters.Visible = false;
			this.IdControl.DataPropertyName = "IdControl";
			this.IdControl.HeaderText = "IdControl";
			this.IdControl.Name = "IdControl";
			this.IdControl.ReadOnly = true;
			this.IdControl.Visible = false;
			this.IdBisMake.DataPropertyName = "IdBisMake";
			this.IdBisMake.HeaderText = "IdBisMake";
			this.IdBisMake.Name = "IdBisMake";
			this.IdBisMake.ReadOnly = true;
			this.IdBisMake.Visible = false;
			this.IdBisImport.DataPropertyName = "IdBisImport";
			this.IdBisImport.HeaderText = "IdBisImport";
			this.IdBisImport.Name = "IdBisImport";
			this.IdBisImport.ReadOnly = true;
			this.IdBisImport.Visible = false;
			this.BarCode.DataPropertyName = "BarCode";
			this.BarCode.HeaderText = "BarCode";
			this.BarCode.Name = "BarCode";
			this.BarCode.ReadOnly = true;
			this.BarCode.Visible = false;
			this.cmsBill.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.cmsBill.Items.AddRange(new ToolStripItem[]
			{
				this.cmsAddProduct,
				this.toolStripSeparator4,
				this.cmsDelProduct,
				this.toolStripSeparator1,
				this.cmsAddBill,
				this.cmsEditBill,
				this.toolStripSeparator2,
				this.cmsSaveBill,
				this.cmsPrintBill,
				this.cmsDellBill,
				this.toolStripSeparator3,
				this.cmsSearchBill
			});
			this.cmsBill.Name = "cmsBill";
			this.cmsBill.Size = new Size(263, 204);
			this.cmsAddProduct.Name = "cmsAddProduct";
			this.cmsAddProduct.Size = new Size(262, 22);
			this.cmsAddProduct.Text = "Thêm sản phẩm";
			this.cmsAddProduct.Click += new EventHandler(this.btnSelect_Click);
			this.toolStripSeparator4.Name = "toolStripSeparator4";
			this.toolStripSeparator4.Size = new Size(259, 6);
			this.cmsDelProduct.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.cmsDelProduct.Name = "cmsDelProduct";
			this.cmsDelProduct.ShortcutKeys = Keys.Delete;
			this.cmsDelProduct.Size = new Size(262, 22);
			this.cmsDelProduct.Text = "Xoá sản phẩm khỏi đơn hàng";
			this.cmsDelProduct.Click += new EventHandler(this.cmsDelProduct_Click);
			this.toolStripSeparator1.Name = "toolStripSeparator1";
			this.toolStripSeparator1.Size = new Size(259, 6);
			this.cmsAddBill.Name = "cmsAddBill";
			this.cmsAddBill.Size = new Size(262, 22);
			this.cmsAddBill.Text = "Tạo mới đơn hàng";
			this.cmsAddBill.Click += new EventHandler(this.cmsAddBill_Click);
			this.cmsEditBill.Name = "cmsEditBill";
			this.cmsEditBill.Size = new Size(262, 22);
			this.cmsEditBill.Text = "Sửa đơn hàng";
			this.cmsEditBill.Click += new EventHandler(this.cmsEditBill_Click);
			this.toolStripSeparator2.Name = "toolStripSeparator2";
			this.toolStripSeparator2.Size = new Size(259, 6);
			this.cmsSaveBill.Enabled = false;
			this.cmsSaveBill.Name = "cmsSaveBill";
			this.cmsSaveBill.Size = new Size(262, 22);
			this.cmsSaveBill.Text = "Lưu đơn hàng";
			this.cmsSaveBill.Click += new EventHandler(this.cmsSaveBill_Click);
			this.cmsPrintBill.Enabled = false;
			this.cmsPrintBill.Name = "cmsPrintBill";
			this.cmsPrintBill.Size = new Size(262, 22);
			this.cmsPrintBill.Text = "In hoá đơn";
			this.cmsPrintBill.Click += new EventHandler(this.cmsPrintBill_Click);
			this.cmsDellBill.Enabled = false;
			this.cmsDellBill.Name = "cmsDellBill";
			this.cmsDellBill.Size = new Size(262, 22);
			this.cmsDellBill.Text = "Xoá hoá đơn";
			this.cmsDellBill.Click += new EventHandler(this.cmsDellBill_Click);
			this.toolStripSeparator3.Name = "toolStripSeparator3";
			this.toolStripSeparator3.Size = new Size(259, 6);
			this.cmsSearchBill.Name = "cmsSearchBill";
			this.cmsSearchBill.Size = new Size(262, 22);
			this.cmsSearchBill.Text = "Tìm kiếm";
			this.cmsSearchBill.Click += new EventHandler(this.cmsSearchBill_Click);
			this.groupBox2.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox2.Controls.Add(this.label28);
			this.groupBox2.Controls.Add(this.label12);
			this.groupBox2.Controls.Add(this.txtBarcode);
			this.groupBox2.Controls.Add(this.label29);
			this.groupBox2.Controls.Add(this.txtItemTotalMoney);
			this.groupBox2.Controls.Add(this.label20);
			this.groupBox2.Controls.Add(this.btnMore);
			this.groupBox2.Controls.Add(this.ckbPossition);
			this.groupBox2.Controls.Add(this.cbbNational);
			this.groupBox2.Controls.Add(this.btnSelectPacket);
			this.groupBox2.Controls.Add(this.label21);
			this.groupBox2.Controls.Add(this.cbbVAT);
			this.groupBox2.Controls.Add(this.cbbPossition);
			this.groupBox2.Controls.Add(this.txtProductPrice2);
			this.groupBox2.Controls.Add(this.btnSelect);
			this.groupBox2.Controls.Add(this.lblPossName);
			this.groupBox2.Controls.Add(this.txtProductPrice1);
			this.groupBox2.Controls.Add(this.label18);
			this.groupBox2.Controls.Add(this.dptProductExpiryDate);
			this.groupBox2.Controls.Add(this.label16);
			this.groupBox2.Controls.Add(this.dtpProductDate);
			this.groupBox2.Controls.Add(this.label15);
			this.groupBox2.Controls.Add(this.txtProductPacket);
			this.groupBox2.Controls.Add(this.label14);
			this.groupBox2.Controls.Add(this.txtProductPrice);
			this.groupBox2.Controls.Add(this.label13);
			this.groupBox2.Controls.Add(this.txtProductNumber);
			this.groupBox2.Controls.Add(this.label11);
			this.groupBox2.Controls.Add(this.txtProductUnit);
			this.groupBox2.Controls.Add(this.label10);
			this.groupBox2.Controls.Add(this.txtProductName);
			this.groupBox2.Controls.Add(this.label9);
			this.groupBox2.Controls.Add(this.label19);
			this.groupBox2.Controls.Add(this.label24);
			this.groupBox2.Controls.Add(this.btnListUnit);
			this.groupBox2.Location = new System.Drawing.Point(231, 93);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new Size(690, 158);
			this.groupBox2.TabIndex = 2;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "Sản phần cần nhập";
			this.label28.AutoSize = true;
			this.label28.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label28.Location = new System.Drawing.Point(386, 133);
			this.label28.Name = "label28";
			this.label28.Size = new Size(60, 15);
			this.label28.TabIndex = 143;
			this.label28.Text = "T.T khác :";
			this.label12.AutoSize = true;
			this.label12.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label12.Location = new System.Drawing.Point(552, 78);
			this.label12.Name = "label12";
			this.label12.Size = new Size(37, 15);
			this.label12.TabIndex = 142;
			this.label12.Text = "M. V :";
			this.txtBarcode.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtBarcode.BackColor = Color.White;
			this.txtBarcode.Font = new Font("Arial", 9.75f);
			this.txtBarcode.Location = new System.Drawing.Point(591, 75);
			this.txtBarcode.Name = "txtBarcode";
			this.txtBarcode.ReadOnly = true;
			this.txtBarcode.Size = new Size(93, 22);
			this.txtBarcode.TabIndex = 44;
			this.txtBarcode.KeyDown += new KeyEventHandler(this.txtBarcode_KeyDown);
			this.label29.AutoSize = true;
			this.label29.Location = new System.Drawing.Point(393, 51);
			this.label29.Name = "label29";
			this.label29.Size = new Size(53, 15);
			this.label29.TabIndex = 141;
			this.label29.Text = "Vị trí để :";
			this.txtItemTotalMoney.BackColor = Color.White;
			this.txtItemTotalMoney.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtItemTotalMoney.Location = new System.Drawing.Point(275, 47);
			this.txtItemTotalMoney.Name = "txtItemTotalMoney";
			this.txtItemTotalMoney.Size = new Size(98, 22);
			this.txtItemTotalMoney.TabIndex = 10;
			this.txtItemTotalMoney.TextAlign = HorizontalAlignment.Right;
			this.txtItemTotalMoney.TextChanged += new EventHandler(this.txtItemTotalMoney_TextChanged);
			this.txtItemTotalMoney.Leave += new EventHandler(this.txtItemTotalMoney_Leave);
			this.txtItemTotalMoney.KeyPress += new KeyPressEventHandler(this.txtItemTotalMoney_KeyPress);
			this.txtItemTotalMoney.Enter += new EventHandler(this.txtItemTotalMoney_Enter);
			this.label20.AutoSize = true;
			this.label20.Location = new System.Drawing.Point(208, 50);
			this.label20.Name = "label20";
			this.label20.Size = new Size(64, 15);
			this.label20.TabIndex = 139;
			this.label20.Text = "Tổng tiền :";
			this.btnMore.Cursor = Cursors.Hand;
			this.btnMore.Enabled = false;
//			this.btnMore.Image = (Image)componentResourceManager.GetObject("btnMore.Image");
			this.btnMore.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnMore.Location = new System.Drawing.Point(449, 128);
			this.btnMore.Name = "btnMore";
			this.btnMore.Size = new Size(235, 25);
			this.btnMore.TabIndex = 137;
			this.btnMore.Text = "Bổ sung thêm thông tin";
			this.btnMore.TextAlign = ContentAlignment.MiddleRight;
			this.toolTip1.SetToolTip(this.btnMore, "Bổ sung thêm thông tin");
			this.btnMore.UseVisualStyleBackColor = true;
			this.btnMore.Click += new EventHandler(this.btnMore_Click);
			this.ckbPossition.AutoSize = true;
			this.ckbPossition.Location = new System.Drawing.Point(24, 132);
			this.ckbPossition.Name = "ckbPossition";
			this.ckbPossition.Size = new Size(75, 19);
			this.ckbPossition.TabIndex = 136;
			this.ckbPossition.Text = "Đổi vị trí :";
			this.ckbPossition.UseVisualStyleBackColor = true;
			this.cbbNational.BackColor = Color.White;
			this.cbbNational.ContextMenuStrip = this.ctmDir;
			this.cbbNational.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbNational.Enabled = false;
			this.cbbNational.FlatStyle = FlatStyle.Flat;
			this.cbbNational.FormattingEnabled = true;
			this.cbbNational.Items.AddRange(new object[]
			{
				"      0%",
				"      5%",
				"    10%"
			});
			this.cbbNational.Location = new System.Drawing.Point(102, 102);
			this.cbbNational.Name = "cbbNational";
			this.cbbNational.Size = new Size(98, 23);
			this.cbbNational.TabIndex = 14;
			this.cbbNational.KeyPress += new KeyPressEventHandler(this.cbbNational_KeyPress);
			this.ctmDir.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.ctmDir.Items.AddRange(new ToolStripItem[]
			{
				this.ctmDirAddProduct,
				this.ctmDirAddUnit,
				this.ctmDirAddRegion,
				this.ctmDirAddPosition
			});
			this.ctmDir.Name = "ctmDir";
			this.ctmDir.Size = new Size(246, 92);
			this.ctmDirAddProduct.Name = "ctmDirAddProduct";
			this.ctmDirAddProduct.Size = new Size(245, 22);
			this.ctmDirAddProduct.Text = "Thêm sản phẩm vào danh mục";
			this.ctmDirAddProduct.Click += new EventHandler(this.ctmDirAddProduct_Click);
			this.ctmDirAddUnit.Name = "ctmDirAddUnit";
			this.ctmDirAddUnit.Size = new Size(245, 22);
			this.ctmDirAddUnit.Text = "Thêm đơn vị tính";
			this.ctmDirAddUnit.Click += new EventHandler(this.ctmDirAddUnit_Click);
			this.ctmDirAddRegion.Name = "ctmDirAddRegion";
			this.ctmDirAddRegion.Size = new Size(245, 22);
			this.ctmDirAddRegion.Text = "Thêm xuất xứ - Nguồn gốc";
			this.ctmDirAddRegion.Click += new EventHandler(this.ctmDirAddRegion_Click);
			this.ctmDirAddPosition.Name = "ctmDirAddPosition";
			this.ctmDirAddPosition.Size = new Size(245, 22);
			this.ctmDirAddPosition.Text = "Thêm vị trí";
			this.ctmDirAddPosition.Click += new EventHandler(this.ctmDirAddPosition_Click);
			this.btnSelectPacket.BackColor = Color.White;
			this.btnSelectPacket.FlatAppearance.BorderColor = Color.FromArgb(192, 255, 255);
			this.btnSelectPacket.FlatAppearance.BorderSize = 0;
			this.btnSelectPacket.FlatStyle = FlatStyle.Flat;
//			this.btnSelectPacket.Image = (Image)componentResourceManager.GetObject("btnSelectPacket.Image");
			this.btnSelectPacket.Location = new System.Drawing.Point(350, 104);
			this.btnSelectPacket.Name = "btnSelectPacket";
			this.btnSelectPacket.Size = new Size(18, 18);
			this.btnSelectPacket.TabIndex = 39;
			this.btnSelectPacket.TextAlign = ContentAlignment.TopCenter;
			this.btnSelectPacket.UseVisualStyleBackColor = false;
			this.btnSelectPacket.Click += new EventHandler(this.btnSelectPacket_Click);
			this.label21.AutoSize = true;
			this.label21.Location = new System.Drawing.Point(45, 106);
			this.label21.Name = "label21";
			this.label21.Size = new Size(53, 15);
			this.label21.TabIndex = 38;
			this.label21.Text = "Xuất xứ :";
			this.cbbVAT.BackColor = Color.White;
			this.cbbVAT.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbVAT.FlatStyle = FlatStyle.Flat;
			this.cbbVAT.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.cbbVAT.FormattingEnabled = true;
			this.cbbVAT.Items.AddRange(new object[]
			{
				"VAT 0%",
				"VAT 5%",
				"VAT 10%"
			});
			this.cbbVAT.Location = new System.Drawing.Point(591, 20);
			this.cbbVAT.Name = "cbbVAT";
			this.cbbVAT.Size = new Size(93, 23);
			this.cbbVAT.TabIndex = 8;
			this.cbbVAT.SelectedIndexChanged += new EventHandler(this.cbbVAT_SelectedIndexChanged);
			this.cbbVAT.KeyPress += new KeyPressEventHandler(this.cbbVAT_KeyPress);
			this.cbbVAT.SelectedValueChanged += new EventHandler(this.cbbVAT_SelectedIndexChanged);
			this.cbbPossition.BackColor = Color.White;
			this.cbbPossition.ContextMenuStrip = this.ctmDir;
			this.cbbPossition.Cursor = Cursors.Hand;
			this.cbbPossition.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbPossition.Enabled = false;
			this.cbbPossition.FlatStyle = FlatStyle.Flat;
			this.cbbPossition.FormattingEnabled = true;
			this.cbbPossition.Location = new System.Drawing.Point(102, 129);
			this.cbbPossition.Name = "cbbPossition";
			this.cbbPossition.Size = new Size(271, 23);
			this.cbbPossition.TabIndex = 17;
			this.txtProductPrice2.BackColor = Color.White;
			this.txtProductPrice2.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice2.Location = new System.Drawing.Point(449, 75);
			this.txtProductPrice2.Name = "txtProductPrice2";
			this.txtProductPrice2.ReadOnly = true;
			this.txtProductPrice2.Size = new Size(98, 22);
			this.txtProductPrice2.TabIndex = 13;
			this.txtProductPrice2.TextAlign = HorizontalAlignment.Right;
			this.txtProductPrice2.TextChanged += new EventHandler(this.txtProductPrice2_TextChanged);
			this.txtProductPrice2.Leave += new EventHandler(this.txtProductPrice2_Leave);
			this.txtProductPrice2.KeyPress += new KeyPressEventHandler(this.txtProductPrice2_KeyPress);
			this.txtProductPrice2.Enter += new EventHandler(this.txtProductPrice2_Enter);
			this.btnSelect.BackColor = Color.White;
			this.btnSelect.Cursor = Cursors.Hand;
			this.btnSelect.Enabled = false;
			this.btnSelect.FlatAppearance.BorderColor = Color.Cyan;
			this.btnSelect.FlatAppearance.BorderSize = 0;
			this.btnSelect.FlatStyle = FlatStyle.Flat;
            //this.btnSelect.Image = (Image)componentResourceManager.GetObject("btnSelect.Image");
			this.btnSelect.Location = new System.Drawing.Point(348, 24);
			this.btnSelect.Name = "btnSelect";
			this.btnSelect.Size = new Size(22, 16);
			this.btnSelect.TabIndex = 16;
			this.toolTip1.SetToolTip(this.btnSelect, "Chọn sản phẩm cần nhập");
			this.btnSelect.UseVisualStyleBackColor = false;
			this.btnSelect.Click += new EventHandler(this.btnSelect_Click);
			this.lblPossName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblPossName.BackColor = Color.White;
			this.lblPossName.BorderStyle = BorderStyle.Fixed3D;
			this.lblPossName.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.lblPossName.ForeColor = Color.Blue;
			this.lblPossName.Location = new System.Drawing.Point(449, 48);
			this.lblPossName.Name = "lblPossName";
			this.lblPossName.Size = new Size(235, 21);
			this.lblPossName.TabIndex = 41;
			this.lblPossName.Text = "-:-";
			this.lblPossName.TextAlign = ContentAlignment.MiddleLeft;
			this.txtProductPrice1.BackColor = Color.White;
			this.txtProductPrice1.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice1.Location = new System.Drawing.Point(275, 75);
			this.txtProductPrice1.Name = "txtProductPrice1";
			this.txtProductPrice1.ReadOnly = true;
			this.txtProductPrice1.Size = new Size(98, 22);
			this.txtProductPrice1.TabIndex = 12;
			this.txtProductPrice1.TextAlign = HorizontalAlignment.Right;
			this.txtProductPrice1.TextChanged += new EventHandler(this.txtProductPrice1_TextChanged);
			this.txtProductPrice1.Leave += new EventHandler(this.txtProductPrice1_Leave);
			this.txtProductPrice1.KeyPress += new KeyPressEventHandler(this.txtProductPrice1_KeyPress);
			this.txtProductPrice1.Enter += new EventHandler(this.txtProductPrice1_Enter);
			this.label18.AutoSize = true;
			this.label18.Location = new System.Drawing.Point(209, 78);
			this.label18.Name = "label18";
			this.label18.Size = new Size(63, 15);
			this.label18.TabIndex = 32;
			this.label18.Text = "Giá buôn :";
			this.dptProductExpiryDate.CalendarForeColor = Color.Red;
			this.dptProductExpiryDate.CustomFormat = "dd/MM/yyyy";
			this.dptProductExpiryDate.Format = DateTimePickerFormat.Custom;
			this.dptProductExpiryDate.Location = new System.Drawing.Point(591, 103);
			this.dptProductExpiryDate.Name = "dptProductExpiryDate";
			this.dptProductExpiryDate.Size = new Size(93, 21);
			this.dptProductExpiryDate.TabIndex = 17;
			this.dptProductExpiryDate.KeyPress += new KeyPressEventHandler(this.dptProductExpiryDate_KeyPress);
			this.label16.AutoSize = true;
			this.label16.ForeColor = Color.Red;
			this.label16.Location = new System.Drawing.Point(552, 106);
			this.label16.Name = "label16";
			this.label16.Size = new Size(39, 15);
			this.label16.TabIndex = 30;
			this.label16.Text = "HSD :";
			this.dtpProductDate.CalendarMonthBackground = Color.White;
			this.dtpProductDate.CustomFormat = "dd/MM/yyyy";
			this.dtpProductDate.Format = DateTimePickerFormat.Custom;
			this.dtpProductDate.Location = new System.Drawing.Point(449, 103);
			this.dtpProductDate.Name = "dtpProductDate";
			this.dtpProductDate.Size = new Size(98, 21);
			this.dtpProductDate.TabIndex = 16;
			this.dtpProductDate.ValueChanged += new EventHandler(this.dtpProductDate_ValueChanged);
			this.dtpProductDate.KeyPress += new KeyPressEventHandler(this.dtpProductDate_KeyPress);
			this.label15.AutoSize = true;
			this.label15.ForeColor = Color.Red;
			this.label15.Location = new System.Drawing.Point(387, 106);
			this.label15.Name = "label15";
			this.label15.Size = new Size(59, 15);
			this.label15.TabIndex = 28;
			this.label15.Text = "Ngày SX :";
			this.txtProductPacket.BackColor = Color.White;
			this.txtProductPacket.CharacterCasing = CharacterCasing.Upper;
			this.txtProductPacket.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtProductPacket.Location = new System.Drawing.Point(275, 102);
			this.txtProductPacket.Name = "txtProductPacket";
			this.txtProductPacket.Size = new Size(98, 22);
			this.txtProductPacket.TabIndex = 15;
			this.txtProductPacket.TextAlign = HorizontalAlignment.Center;
			this.txtProductPacket.Leave += new EventHandler(this.txtProductPacket_Leave);
			this.txtProductPacket.KeyPress += new KeyPressEventHandler(this.txtProductPacket_KeyPress);
			this.txtProductPacket.Enter += new EventHandler(this.txtProductPacket_Enter);
			this.label14.AutoSize = true;
			this.label14.Location = new System.Drawing.Point(204, 106);
			this.label14.Name = "label14";
			this.label14.Size = new Size(68, 15);
			this.label14.TabIndex = 26;
			this.label14.Text = "Số hiệu lô :";
			this.txtProductPrice.BackColor = Color.White;
			this.txtProductPrice.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice.Location = new System.Drawing.Point(102, 75);
			this.txtProductPrice.Name = "txtProductPrice";
			this.txtProductPrice.Size = new Size(98, 22);
			this.txtProductPrice.TabIndex = 11;
			this.txtProductPrice.TextAlign = HorizontalAlignment.Right;
			this.txtProductPrice.TextChanged += new EventHandler(this.txtProductPrice_TextChanged);
			this.txtProductPrice.Leave += new EventHandler(this.txtProductPrice_Leave);
			this.txtProductPrice.KeyPress += new KeyPressEventHandler(this.txtProductPrice_KeyPress);
			this.txtProductPrice.Enter += new EventHandler(this.txtProductPrice_Enter);
			this.label13.AutoSize = true;
			this.label13.Location = new System.Drawing.Point(36, 78);
			this.label13.Name = "label13";
			this.label13.Size = new Size(63, 15);
			this.label13.TabIndex = 24;
			this.label13.Text = "Giá nhập :";
			this.txtProductNumber.BackColor = Color.White;
			this.txtProductNumber.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductNumber.Location = new System.Drawing.Point(102, 47);
			this.txtProductNumber.Name = "txtProductNumber";
			this.txtProductNumber.Size = new Size(98, 22);
			this.txtProductNumber.TabIndex = 9;
			this.txtProductNumber.TextAlign = HorizontalAlignment.Right;
			this.txtProductNumber.TextChanged += new EventHandler(this.txtProductNumber_TextChanged);
			this.txtProductNumber.Leave += new EventHandler(this.txtProductNumber_Leave);
			this.txtProductNumber.KeyPress += new KeyPressEventHandler(this.txtProductNumber_KeyPress);
			this.txtProductNumber.Enter += new EventHandler(this.txtProductNumber_Enter);
			this.label11.AutoSize = true;
			this.label11.Location = new System.Drawing.Point(35, 50);
			this.label11.Name = "label11";
			this.label11.Size = new Size(64, 15);
			this.label11.TabIndex = 20;
			this.label11.Text = "Số lượng :";
			this.txtProductUnit.BackColor = Color.White;
			this.txtProductUnit.ContextMenuStrip = this.ctmDir;
			this.txtProductUnit.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductUnit.Location = new System.Drawing.Point(449, 21);
			this.txtProductUnit.Name = "txtProductUnit";
			this.txtProductUnit.ReadOnly = true;
			this.txtProductUnit.Size = new Size(98, 22);
			this.txtProductUnit.TabIndex = 7;
			this.txtProductUnit.DoubleClick += new EventHandler(this.txtProductUnit_DoubleClick);
			this.txtProductUnit.TextChanged += new EventHandler(this.txtProductUnit_TextChanged);
			this.txtProductUnit.Leave += new EventHandler(this.txtProductUnit_Leave);
			this.txtProductUnit.KeyPress += new KeyPressEventHandler(this.txtProductUnit_KeyPress);
			this.txtProductUnit.Enter += new EventHandler(this.txtProductUnit_Enter);
			this.label10.AutoSize = true;
			this.label10.Location = new System.Drawing.Point(375, 24);
			this.label10.Name = "label10";
			this.label10.Size = new Size(71, 15);
			this.label10.TabIndex = 18;
			this.label10.Text = "Đơn vị tính :";
			this.txtProductName.BackColor = Color.White;
			this.txtProductName.ContextMenuStrip = this.ctmDir;
			this.txtProductName.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductName.Location = new System.Drawing.Point(102, 21);
			this.txtProductName.Name = "txtProductName";
			this.txtProductName.Size = new Size(271, 22);
			this.txtProductName.TabIndex = 6;
			this.txtProductName.DoubleClick += new EventHandler(this.txtProductName_DoubleClick);
			this.txtProductName.TextChanged += new EventHandler(this.txtProductName_TextChanged);
			this.txtProductName.KeyDown += new KeyEventHandler(this.txtProductName_KeyDown);
			this.txtProductName.Leave += new EventHandler(this.txtProductName_Leave);
			this.txtProductName.KeyPress += new KeyPressEventHandler(this.txtProductName_KeyPress);
			this.txtProductName.Enter += new EventHandler(this.txtProductName_Enter);
			this.label9.AutoSize = true;
			this.label9.Location = new System.Drawing.Point(6, 24);
			this.label9.Name = "label9";
			this.label9.Size = new Size(93, 15);
			this.label9.TabIndex = 16;
			this.label9.Text = "Tên sản phẩm :";
			this.label19.AutoSize = true;
			this.label19.Location = new System.Drawing.Point(377, 78);
			this.label19.Name = "label19";
			this.label19.Size = new Size(69, 15);
			this.label19.TabIndex = 34;
			this.label19.Text = "Giá bán lẻ :";
			this.label24.AutoSize = true;
			this.label24.Location = new System.Drawing.Point(547, 24);
			this.label24.Name = "label24";
			this.label24.Size = new Size(41, 15);
            this.label24.TabIndex = 140;
			this.label24.Text = "Thuế :";
			this.btnListUnit.BackColor = Color.White;
			this.btnListUnit.FlatAppearance.BorderSize = 0;
			this.btnListUnit.FlatStyle = FlatStyle.Flat;
            //this.btnListUnit.Image = (Image)componentResourceManager.GetObject("btnListUnit.Image");
			this.btnListUnit.Location = new System.Drawing.Point(524, 22);
			this.btnListUnit.Name = "btnListUnit";
			this.btnListUnit.Size = new Size(18, 18);
			this.btnListUnit.TabIndex = 131;
			this.toolTip1.SetToolTip(this.btnListUnit, "Chọn đơn vị thể hiện khác");
			this.btnListUnit.UseVisualStyleBackColor = false;
			this.btnListUnit.Click += new EventHandler(this.btnListUnit_Click);
			this.txtProductMoney.BackColor = Color.White;
			this.txtProductMoney.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductMoney.Location = new System.Drawing.Point(119, 106);
			this.txtProductMoney.Name = "txtProductMoney";
			this.txtProductMoney.ReadOnly = true;
			this.txtProductMoney.Size = new Size(100, 22);
			this.txtProductMoney.TabIndex = 1155;
			this.txtProductMoney.TextAlign = HorizontalAlignment.Right;
			this.txtProductMoney.TextChanged += new EventHandler(this.txtProductMoney_TextChanged);
			this.txtProductMoney.Leave += new EventHandler(this.txtProductMoney_Leave);
			this.btnAddToBill.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAddToBill.BackColor = Color.White;
			this.btnAddToBill.Enabled = false;
			this.btnAddToBill.FlatAppearance.BorderColor = Color.FromArgb(192, 255, 255);
			this.btnAddToBill.FlatStyle = FlatStyle.Flat;
			this.btnAddToBill.Location = new System.Drawing.Point(14, 562);
			this.btnAddToBill.Name = "btnAddToBill";
			this.btnAddToBill.Size = new Size(140, 26);
			this.btnAddToBill.TabIndex = 1555;
			this.btnAddToBill.Text = "Thêm sản phẩm [ F3 ]";
			this.btnAddToBill.UseVisualStyleBackColor = false;
			this.btnAddToBill.Click += new EventHandler(this.btnAddToBill_Click);
			this.btnAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAdd.BackColor = SystemColors.ButtonFace;
			this.btnAdd.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnAdd.FlatStyle = FlatStyle.Flat;
			this.btnAdd.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnAdd.Location = new System.Drawing.Point(11, 563);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new Size(105, 26);
			this.btnAdd.TabIndex = 0;
			this.btnAdd.Text = "Thêm HĐ [ F4 ]";
			this.btnAdd.UseVisualStyleBackColor = false;
			this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
			this.btnEdit.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnEdit.BackColor = SystemColors.ButtonFace;
			this.btnEdit.Enabled = false;
			this.btnEdit.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnEdit.FlatStyle = FlatStyle.Flat;
			this.btnEdit.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnEdit.Location = new System.Drawing.Point(120, 563);
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.Size = new Size(105, 26);
			this.btnEdit.TabIndex = 26;
			this.btnEdit.Text = "Sửa HĐ [ F5 ]";
			this.btnEdit.UseVisualStyleBackColor = false;
			this.btnEdit.Click += new EventHandler(this.btnEdit_Click);
			this.btnSave.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSave.BackColor = SystemColors.ButtonFace;
			this.btnSave.Enabled = false;
			this.btnSave.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnSave.FlatStyle = FlatStyle.Flat;
			this.btnSave.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSave.Location = new System.Drawing.Point(229, 563);
			this.btnSave.Name = "btnSave";
			this.btnSave.Size = new Size(105, 26);
			this.btnSave.TabIndex = 22;
			this.btnSave.Text = "Lưu HĐ [ F6 ]";
			this.btnSave.UseVisualStyleBackColor = false;
			this.btnSave.Click += new EventHandler(this.btnSave_Click);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.BackColor = SystemColors.ButtonFace;
			this.btnPrint.Enabled = false;
			this.btnPrint.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnPrint.FlatStyle = FlatStyle.Flat;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(338, 563);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(102, 26);
			this.btnPrint.TabIndex = 23;
			this.btnPrint.Text = "Xem và in [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = false;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnDel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnDel.BackColor = SystemColors.ButtonFace;
			this.btnDel.Enabled = false;
			this.btnDel.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnDel.FlatStyle = FlatStyle.Flat;
			this.btnDel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnDel.Location = new System.Drawing.Point(444, 563);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new Size(105, 26);
			this.btnDel.TabIndex = 24;
			this.btnDel.Text = "Xoá HĐ [ F8 ]";
			this.btnDel.UseVisualStyleBackColor = false;
			this.btnDel.Click += new EventHandler(this.btnDel_Click);
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.BackColor = SystemColors.ButtonFace;
			this.btnClose.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnClose.FlatStyle = FlatStyle.Flat;
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(809, 563);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(106, 26);
			this.btnClose.TabIndex = 38;
			this.btnClose.Text = "Thoát [ESC]";
			this.btnClose.UseVisualStyleBackColor = false;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.dgvBill.AllowUserToAddRows = false;
			this.dgvBill.AllowUserToDeleteRows = false;
			this.dgvBill.AllowUserToOrderColumns = true;
			this.dgvBill.AllowUserToResizeColumns = false;
			this.dgvBill.AllowUserToResizeRows = false;
			dataGridViewCellStyle10.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle10.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvBill.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
			this.dgvBill.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left);
			this.dgvBill.BackgroundColor = Color.White;
			this.dgvBill.BorderStyle = BorderStyle.Fixed3D;
			this.dgvBill.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvBill.Columns.AddRange(new DataGridViewColumn[]
			{
				this.dataGridViewTextBoxColumn1,
				this.dataGridViewTextBoxColumn7,
				this.Column10,
				this.Column11,
				this.Column12,
				this.Column13,
				this.Column14,
				this.Column19,
				this.Column20,
				this.Column21
			});
			this.dgvBill.ContextMenuStrip = this.ctmJustBill;
			this.dgvBill.Cursor = Cursors.Hand;
			this.dgvBill.EnableHeadersVisualStyles = false;
			this.dgvBill.Location = new System.Drawing.Point(6, 144);
			this.dgvBill.MultiSelect = false;
			this.dgvBill.Name = "dgvBill";
			this.dgvBill.ReadOnly = true;
			this.dgvBill.RowHeadersVisible = false;
			this.dgvBill.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvBill.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvBill.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvBill.Size = new Size(220, 406);
			this.dgvBill.TabIndex = 0;
			this.dgvBill.CellEnter += new DataGridViewCellEventHandler(this.dgvBill_CellEnter);
			this.dataGridViewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
			this.dataGridViewTextBoxColumn1.HeaderText = "Hoá đơn";
			this.dataGridViewTextBoxColumn1.MinimumWidth = 100;
			this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
			this.dataGridViewTextBoxColumn1.ReadOnly = true;
			this.dataGridViewTextBoxColumn7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn7.DataPropertyName = "CreateDate";
			dataGridViewCellStyle11.Format = "D";
			dataGridViewCellStyle11.NullValue = null;
			this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle11;
			this.dataGridViewTextBoxColumn7.HeaderText = "Ngày lập";
			this.dataGridViewTextBoxColumn7.MinimumWidth = 88;
			this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
			this.dataGridViewTextBoxColumn7.ReadOnly = true;
			this.dataGridViewTextBoxColumn7.Width = 88;
			this.Column10.DataPropertyName = "TotalMoney";
			this.Column10.HeaderText = "TotalMoney";
			this.Column10.Name = "Column10";
			this.Column10.ReadOnly = true;
			this.Column10.Visible = false;
			this.Column11.DataPropertyName = "TypeInput";
			this.Column11.HeaderText = "TypeInput";
			this.Column11.Name = "Column11";
			this.Column11.ReadOnly = true;
			this.Column11.Visible = false;
			this.Column12.DataPropertyName = "WID";
			this.Column12.HeaderText = "WID";
			this.Column12.Name = "Column12";
			this.Column12.ReadOnly = true;
			this.Column12.Visible = false;
			this.Column13.DataPropertyName = "Note";
			this.Column13.HeaderText = "Note";
			this.Column13.Name = "Column13";
			this.Column13.ReadOnly = true;
			this.Column13.Visible = false;
			this.Column14.DataPropertyName = "PID";
			this.Column14.HeaderText = "PID";
			this.Column14.Name = "Column14";
			this.Column14.ReadOnly = true;
			this.Column14.Visible = false;
			this.Column19.DataPropertyName = "UserName";
			this.Column19.HeaderText = "Tài khoản";
			this.Column19.Name = "Column19";
			this.Column19.ReadOnly = true;
			this.Column19.Visible = false;
			this.Column20.DataPropertyName = "FullName";
			this.Column20.HeaderText = "Tên tài khoản";
			this.Column20.Name = "Column20";
			this.Column20.ReadOnly = true;
			this.Column20.Visible = false;
			this.Column21.DataPropertyName = "Printed";
			this.Column21.HeaderText = "Printed";
			this.Column21.Name = "Column21";
			this.Column21.ReadOnly = true;
			this.Column21.Visible = false;
			this.ctmJustBill.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.ctmJustBill.Items.AddRange(new ToolStripItem[]
			{
				this.ctmJustBillAdd,
				this.ctmJustBillEdit,
				this.ctmJustBillPrint,
				this.toolStripSeparator5,
				this.ctmJustBillDel,
				this.toolStripSeparator6,
				this.ctmJustBillSearch
			});
			this.ctmJustBill.Name = "ctmJustBill";
			this.ctmJustBill.Size = new Size(177, 126);
			this.ctmJustBillAdd.Name = "ctmJustBillAdd";
			this.ctmJustBillAdd.Size = new Size(176, 22);
			this.ctmJustBillAdd.Text = "Thêm hoá đơn";
			this.ctmJustBillAdd.Click += new EventHandler(this.ctmJustBillAdd_Click);
			this.ctmJustBillEdit.Name = "ctmJustBillEdit";
			this.ctmJustBillEdit.Size = new Size(176, 22);
			this.ctmJustBillEdit.Text = "Sửa hoá đơn";
			this.ctmJustBillEdit.Click += new EventHandler(this.ctmJustBillEdit_Click);
			this.ctmJustBillPrint.Name = "ctmJustBillPrint";
			this.ctmJustBillPrint.Size = new Size(176, 22);
			this.ctmJustBillPrint.Text = "Xem và In hoá đơn";
			this.ctmJustBillPrint.Click += new EventHandler(this.ctmJustBillPrint_Click);
			this.toolStripSeparator5.Name = "toolStripSeparator5";
			this.toolStripSeparator5.Size = new Size(173, 6);
			this.ctmJustBillDel.Name = "ctmJustBillDel";
			this.ctmJustBillDel.Size = new Size(176, 22);
			this.ctmJustBillDel.Text = "Xoá hoá đơn";
			this.ctmJustBillDel.Click += new EventHandler(this.ctmJustBillDel_Click);
			this.toolStripSeparator6.Name = "toolStripSeparator6";
			this.toolStripSeparator6.Size = new Size(173, 6);
			this.ctmJustBillSearch.Name = "ctmJustBillSearch";
			this.ctmJustBillSearch.Size = new Size(176, 22);
			this.ctmJustBillSearch.Text = "Tìm kiếm hoá đơn";
			this.ctmJustBillSearch.Click += new EventHandler(this.ctmJustBillSearch_Click);
			this.groupBox3.Controls.Add(this.label3);
			this.groupBox3.Controls.Add(this.dtpTo);
			this.groupBox3.Controls.Add(this.dtpFrom);
			this.groupBox3.Controls.Add(this.label17);
			this.groupBox3.Controls.Add(this.btnSearchTime);
			this.groupBox3.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox3.Location = new System.Drawing.Point(6, 93);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new Size(220, 46);
			this.groupBox3.TabIndex = 40;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "Tìm kiếm";
			this.label3.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
            //this.label3.Image = (Image)componentResourceManager.GetObject("label3.Image");
			this.label3.Location = new System.Drawing.Point(88, -89);
			this.label3.Name = "label3";
			this.label3.Size = new Size(20, 25);
			this.label3.TabIndex = 144;
			this.dtpTo.CustomFormat = "dd/MM/yyyy";
			this.dtpTo.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpTo.Format = DateTimePickerFormat.Custom;
			this.dtpTo.Location = new System.Drawing.Point(109, 19);
			this.dtpTo.Name = "dtpTo";
			this.dtpTo.Size = new Size(86, 21);
			this.dtpTo.TabIndex = 142;
			this.dtpFrom.CustomFormat = "dd/MM/yyyy";
			this.dtpFrom.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpFrom.Format = DateTimePickerFormat.Custom;
			this.dtpFrom.Location = new System.Drawing.Point(5, 19);
			this.dtpFrom.Name = "dtpFrom";
			this.dtpFrom.Size = new Size(86, 21);
			this.dtpFrom.TabIndex = 141;
            //this.label17.Image = (Image)componentResourceManager.GetObject("label17.Image");
			this.label17.Location = new System.Drawing.Point(91, 17);
			this.label17.Name = "label17";
			this.label17.Size = new Size(20, 25);
			this.label17.TabIndex = 146;
			this.btnSearchTime.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
			this.btnSearchTime.FlatAppearance.BorderSize = 0;
			this.btnSearchTime.FlatStyle = FlatStyle.Flat;
			this.btnSearchTime.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
            //this.btnSearchTime.Image = (Image)componentResourceManager.GetObject("btnSearchTime.Image");
			this.btnSearchTime.Location = new System.Drawing.Point(195, 19);
			this.btnSearchTime.Name = "btnSearchTime";
			this.btnSearchTime.Size = new Size(21, 21);
			this.btnSearchTime.TabIndex = 145;
			this.btnSearchTime.UseVisualStyleBackColor = true;
			this.btnSearchTime.Click += new EventHandler(this.btnSearchTime_Click);
			this.btnSearch.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSearch.BackColor = SystemColors.ButtonFace;
			this.btnSearch.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnSearch.FlatStyle = FlatStyle.Flat;
			this.btnSearch.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearch.Location = new System.Drawing.Point(553, 563);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(105, 26);
			this.btnSearch.TabIndex = 25;
			this.btnSearch.Text = "Tìm kiếm [ F9 ]";
			this.btnSearch.UseVisualStyleBackColor = false;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.txtMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtMoney.BackColor = Color.White;
			this.txtMoney.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtMoney.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtMoney.Location = new System.Drawing.Point(809, 497);
			this.txtMoney.Name = "txtMoney";
			this.txtMoney.ReadOnly = true;
			this.txtMoney.Size = new Size(106, 22);
			this.txtMoney.TabIndex = 156;
			this.txtMoney.Text = "0";
			this.txtMoney.TextAlign = HorizontalAlignment.Right;
			this.txtMoney.TextChanged += new EventHandler(this.txtMoney_TextChanged);
			this.label27.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label27.AutoSize = true;
			this.label27.BackColor = Color.White;
			this.label27.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label27.ForeColor = SystemColors.MenuText;
			this.label27.Location = new System.Drawing.Point(729, 524);
			this.label27.Name = "label27";
			this.label27.Size = new Size(76, 16);
			this.label27.TabIndex = 155;
			this.label27.Text = "Tổng tiền :";
			this.toolTip1.IsBalloon = true;
			this.label26.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label26.BackColor = Color.White;
			this.label26.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label26.Location = new System.Drawing.Point(231, 490);
			this.label26.Name = "label26";
			this.label26.Size = new Size(690, 60);
			this.label26.TabIndex = 154;
			this.timer1.Tick += new EventHandler(this.timer1_Tick);
			this.btnStopSlide.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnStopSlide.BackColor = SystemColors.ButtonFace;
			this.btnStopSlide.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnStopSlide.FlatStyle = FlatStyle.Flat;
			this.btnStopSlide.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnStopSlide.Location = new System.Drawing.Point(662, 563);
			this.btnStopSlide.Name = "btnStopSlide";
			this.btnStopSlide.Size = new Size(141, 26);
			this.btnStopSlide.TabIndex = 1557;
			this.btnStopSlide.Text = "Dừng xem";
			this.btnStopSlide.UseVisualStyleBackColor = false;
			this.btnStopSlide.Visible = false;
			this.btnStopSlide.Click += new EventHandler(this.btnStopSlide_Click);
			this.timer2.Interval = 1000;
			this.timer2.Tick += new EventHandler(this.timer2_Tick);
			this.txtTotalVAT.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtTotalVAT.BackColor = Color.White;
			this.txtTotalVAT.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtTotalVAT.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtTotalVAT.Location = new System.Drawing.Point(580, 497);
			this.txtTotalVAT.Name = "txtTotalVAT";
			this.txtTotalVAT.ReadOnly = true;
			this.txtTotalVAT.Size = new Size(106, 22);
			this.txtTotalVAT.TabIndex = 1562;
			this.txtTotalVAT.Text = "0";
			this.txtTotalVAT.TextAlign = HorizontalAlignment.Right;
			this.label30.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label30.AutoSize = true;
			this.label30.BackColor = Color.White;
			this.label30.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label30.Location = new System.Drawing.Point(505, 500);
			this.label30.Name = "label30";
			this.label30.Size = new Size(72, 16);
			this.label30.TabIndex = 1561;
			this.label30.Text = "Tiền VAT :";
			this.label31.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label31.BackColor = Color.White;
			this.label31.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label31.Location = new System.Drawing.Point(6, 558);
			this.label31.Name = "label31";
			this.label31.Size = new Size(915, 36);
			this.label31.TabIndex = 1564;
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(930, 600);
			base.Controls.Add(this.txtNote);
			base.Controls.Add(this.groupBox3);
			base.Controls.Add(this.txtProductMoney);
			base.Controls.Add(this.label30);
			base.Controls.Add(this.txtTotalVAT);
			base.Controls.Add(this.btnStopSlide);
			base.Controls.Add(this.txtMoney);
			base.Controls.Add(this.label27);
			base.Controls.Add(this.label8);
			base.Controls.Add(this.btnSearch);
			base.Controls.Add(this.txtMoneyAfterDiscount);
			base.Controls.Add(this.txtDiscountIn);
			base.Controls.Add(this.txtTotalMoney);
			base.Controls.Add(this.label22);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.label7);
			base.Controls.Add(this.btnDel);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.btnSave);
			base.Controls.Add(this.btnAdd);
			base.Controls.Add(this.groupBox2);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.btnEdit);
			base.Controls.Add(this.label26);
			base.Controls.Add(this.dgvBill);
			base.Controls.Add(this.dgvProduct);
			base.Controls.Add(this.label31);
			base.Controls.Add(this.btnAddToBill);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmInput";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "Nhập hàng";
			base.WindowState = FormWindowState.Maximized;
			base.Load += new EventHandler(this.frmInput_Load);
			base.Shown += new EventHandler(this.frmInput_Shown);
			base.FormClosing += new FormClosingEventHandler(this.frmInput_FormClosing);
			base.KeyDown += new KeyEventHandler(this.frmInput_KeyDown);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.dgvProduct).EndInit();
			this.cmsBill.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.groupBox2.PerformLayout();
			this.ctmDir.ResumeLayout(false);
			((ISupportInitialize)this.dgvBill).EndInit();
			this.ctmJustBill.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
